Skip to content

Commit b45e7d0

Browse files
committed
readme: fix ldflags parameter example
1 parent 5a23bf9 commit b45e7d0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ If your project is using this library feel free to submit a PR or send a message
221221
You can use the build tag `debugdemoinfocs` (i.e. `go test -tags debugdemoinfocs -v`) to print out debugging information - such as game events or unhandled demo-messages - during the parsing process.<br>
222222
Side-note: The tag isn't called `debug` to avoid naming conflicts with other libs (and underscores in tags don't work, apparently).
223223

224-
To change the default debugging behavior, Go's `ldflags` parameter can be used. Example for additionally printing out all server-classes with their properties: `-ldflags '-X github.com/markus-wa/demoinfocs-golang.debugServerClasses=YES'`
224+
To change the default debugging behavior, Go's `ldflags` parameter can be used. Example for additionally printing out all server-classes with their properties: `-ldflags="-X 'github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs.debugServerClasses=YES'"`
225225

226226
Check out `debug_on.go` for any other settings that can be changed.
227227

pkg/demoinfocs/debug_on.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const (
1616
no = "NO"
1717
)
1818

19-
// Can be overridden via -ldflags '-X github.com/markus-wa/demoinfocs-golang.debugServerClasses=YES'
19+
// Can be overridden via -ldflags="-X 'github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs.debugServerClasses=YES'"
2020
// Oh and btw we cant use bools for this, Go says 'cannot use -X with non-string symbol'
2121
var (
2222
debugGameEvents = yes

0 commit comments

Comments
 (0)