Skip to content

Commit

Permalink
readme: fix ldflags parameter example
Browse files Browse the repository at this point in the history
  • Loading branch information
markus-wa committed Jun 5, 2021
1 parent 5a23bf9 commit b45e7d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ If your project is using this library feel free to submit a PR or send a message
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>
Side-note: The tag isn't called `debug` to avoid naming conflicts with other libs (and underscores in tags don't work, apparently).

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'`
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'"`

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

Expand Down
2 changes: 1 addition & 1 deletion pkg/demoinfocs/debug_on.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const (
no = "NO"
)

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

0 comments on commit b45e7d0

Please sign in to comment.