Skip to content

Commit 2f5a305

Browse files
authored
Merge pull request #8 from CTNOriginals/development
v0.1.31
2 parents 2c49d58 + f159f9e commit 2f5a305

8 files changed

Lines changed: 16 additions & 18 deletions

File tree

.gitattributes

Lines changed: 0 additions & 2 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ bitburner/
66
# test/
77
build/
88
.vscode/
9+
.nvim
910

10-
*.exe
11+
*.exe

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ version:
4242
run:
4343
go run ./main.go
4444

45-
wrun: # requires wgo: https://github.com/bokwoon95/wgow
45+
wrun: # requires wgo: https://github.com/bokwoon95/wgo
4646
wgo run ./main.go
4747

4848
build-win:
@@ -69,4 +69,4 @@ minor:
6969
$(MAKE) version-update VERS=$(MAJOR).$(NEXT_MINOR).0
7070

7171
major:
72-
$(MAKE) version-update VERS=$(NEXT_MAJOR).0.0
72+
$(MAKE) version-update VERS=$(NEXT_MAJOR).0.0

arguments/arguments.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ var argumentList = argList{
6767
println(def.String())
6868
}
6969

70+
os.Exit(0)
7071
return
7172
}
7273

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ go 1.25.0
44

55
require github.com/gorilla/websocket v1.5.3
66

7-
require github.com/CTNOriginals/CTNGoUtils/v2 v2.3.0
7+
require github.com/CTNOriginals/CTNGoUtils/v2 v2.4.0

go.sum

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
github.com/CTNOriginals/CTNGoUtils/v2 v2.2.1 h1:GLHimS0IaFlfzggTVl21W0IDOM7u/mM/uNcZyBAF1tg=
2-
github.com/CTNOriginals/CTNGoUtils/v2 v2.2.1/go.mod h1:VAJt/7jTpvhkr78N8HmvC7OWBsUxPyV/ItXnPIzLpww=
3-
github.com/CTNOriginals/CTNGoUtils/v2 v2.3.0 h1:5sx77WOHQri0ruS4zJEEiit29LKzACWvq25QDYntG9o=
4-
github.com/CTNOriginals/CTNGoUtils/v2 v2.3.0/go.mod h1:VAJt/7jTpvhkr78N8HmvC7OWBsUxPyV/ItXnPIzLpww=
1+
github.com/CTNOriginals/CTNGoUtils/v2 v2.4.0 h1:BPXOQN8oa4ZgseASsmg+8npMep2d4ofsokvnvkaadMA=
2+
github.com/CTNOriginals/CTNGoUtils/v2 v2.4.0/go.mod h1:VAJt/7jTpvhkr78N8HmvC7OWBsUxPyV/ItXnPIzLpww=
53
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
64
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=

test/test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ func DoTest() {
1515
fmt.Printf("%s: %v\n", "NoWatcher", constants.NoWatcher)
1616
fmt.Printf("%s: %v\n", "NoServer", constants.NoServer)
1717
fmt.Printf("%s: %v\n", "KeepAlive", constants.KeepAlive)
18+
19+
// var content = utils.GetFileContentByPath("proto.ts")
20+
// fmt.Print(string(content))
1821
}

utils/file.go

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,23 @@ func ForEachFileInDirRecursive(dir string, fn func(file os.FileInfo, dir string)
4444
}
4545

4646
// The path needs to be relative the the bitburner dir
47-
func GetFileContentByPath(path string) []rune {
47+
func GetFileContentByPath(path string) []byte {
4848
var filePath = fmt.Sprintf("%s/%s", constants.BitburnerRoot, path)
49-
// filePath := ctnfile.ParseFilePath()
50-
51-
// println(filePath.String())
5249

5350
if !ctnfile.FileExists(filePath) {
5451
fmt.Printf("utils/GetFileContentByPath: File does not exist: %s\n", filePath)
55-
return []rune{}
52+
return []byte{}
5653
}
5754

58-
return ctnfile.GetFileRunes(filePath)
55+
return ctnfile.GetFileBytes(filePath)
5956
}
6057

6158
// Will return the content with any string termenating character escapes.
6259
//
6360
// The output of this will be able to be passed in as a json value
6461
// without it escaping out of its own falue field
65-
func SanitizeFileContent(content []rune) []rune {
66-
sanitized := []rune{}
62+
func SanitizeFileContent(content []byte) []byte {
63+
sanitized := []byte{}
6764

6865
for _, char := range content {
6966
switch char {

0 commit comments

Comments
 (0)