Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
830ccb66
authored
2013-12-09 13:30:19 +0800
by
skyblue
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
initial utils dir
1 parent
4fa625de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
utils/file.go
utils/file_test.go
utils/file.go
0 → 100644
View file @
830ccb6
package
utils
import
(
"os"
"path/filepath"
)
func
SelfPath
()
string
{
path
,
_
:=
filepath
.
Abs
(
os
.
Args
[
0
])
return
path
}
utils/file_test.go
0 → 100644
View file @
830ccb6
package
utils
import
(
"testing"
)
func
TestSelfPath
(
t
*
testing
.
T
)
{
path
:=
SelfPath
()
if
path
==
""
{
t
.
Error
(
"path cannot be empty"
)
}
t
.
Logf
(
"SelfPath: %s"
,
path
)
}
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment