Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package fs
- import (
- "fmt"
- "path"
- "path/filepath"
- "runtime"
- "strings"
- )
- func RootDir() string {
- _, b, _, _ := runtime.Caller(0)
- d := path.Join(path.Dir(b))
- return strings.TrimRight(filepath.Dir(d), "/tool")
- }
- func FullPath(relativePath string) string {
- return fmt.Sprintf("%s/%s", RootDir(), relativePath)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement