提交 690ecb81 编写于 作者: A astaxie

Merge pull request #353 from shxsun/master

initial utils dir
package utils
import (
"os"
"path/filepath"
)
func SelfPath() string {
path, _ := filepath.Abs(os.Args[0])
return path
}
package utils
import (
"testing"
)
func TestSelfPath(t *testing.T) {
path := SelfPath()
if path == "" {
t.Error("path cannot be empty")
}
t.Logf("SelfPath: %s", path)
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册