14 lines
187 B
Go
14 lines
187 B
Go
|
|
package utils
|
||
|
|
|
||
|
|
import (
|
||
|
|
"fmt"
|
||
|
|
p "path"
|
||
|
|
)
|
||
|
|
|
||
|
|
func GetShortPath(path string) string {
|
||
|
|
base := p.Base(path)
|
||
|
|
dir := p.Dir(path)
|
||
|
|
dir = p.Base(dir)
|
||
|
|
return fmt.Sprintf("%s/%s", dir, base)
|
||
|
|
}
|