Skip to content

Commit

Permalink
🏷️ Version 1.0.1
Browse files Browse the repository at this point in the history
**Fix**:
* `manuf.txt` file getting loaded correctly now
  • Loading branch information
kkrypt0nn committed Jan 12, 2023
1 parent 1e11ccc commit 58fe988
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
5 changes: 4 additions & 1 deletion gomanuf.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ package gomanuf
import (
"fmt"
"os"
"path"
"regexp"
"runtime"
"strings"
)

Expand All @@ -17,7 +19,8 @@ func init() {
data = make(map[string]string)
slash28 = make(map[string]string)
slash36 = make(map[string]string)
file, err := os.ReadFile("manuf.txt")
_, location, _, _ := runtime.Caller(0)
file, err := os.ReadFile(path.Join(path.Dir(location), "manuf.txt"))
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 58fe988

Please sign in to comment.