mirror of
https://github.com/Threnklyn/advent-of-code-go.git
synced 2026-06-05 11:50:12 +02:00
updated util packages
This commit is contained in:
@@ -3,7 +3,6 @@ package util
|
||||
import (
|
||||
"io/ioutil"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
)
|
||||
@@ -31,12 +30,3 @@ func ReadFile(pathFromCaller string) string {
|
||||
strContent := string(content)
|
||||
return strings.TrimRight(strContent, "\n")
|
||||
}
|
||||
|
||||
// Dirname is a port of __dirname in node
|
||||
func Dirname() string {
|
||||
_, filename, _, ok := runtime.Caller(1)
|
||||
if !ok {
|
||||
panic("getting calling function")
|
||||
}
|
||||
return filepath.Dir(filename)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user