You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library should be used with `go 1.11` or higher as it is built using Go modules.
21
-
22
-
It's recommended to use modules for consumers as well if possible.
23
-
If you are unfamiliar with Go modules there's a [list of recommended resources](https://github.com/markus-wa/demoinfocs-golang/wiki/Go-Modules#recommended-links--articles) in the wiki.
24
-
25
18
## Go Get
26
19
27
20
go get -u github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs
@@ -32,7 +25,34 @@ If you are currently using version 1.x of this library, check out [this wiki pag
32
25
33
26
The old code is also still available in the [`v1` branch](https://github.com/markus-wa/demoinfocs-golang/tree/v1) if you need it.
This library should be used with `go 1.11` or higher as it is built using Go modules.
51
+
52
+
It's recommended to use modules for consumers as well if possible.
53
+
If you are unfamiliar with Go modules there's a [list of recommended resources](https://github.com/markus-wa/demoinfocs-golang/wiki/Go-Modules#recommended-links--articles) in the wiki.
54
+
55
+
## Getting Started
36
56
37
57
1. Download and install Go 1.11 or newer [from golang.org](https://golang.org/dl/) or via your favourite package manager
38
58
@@ -102,7 +122,7 @@ func main() {
102
122
}
103
123
```
104
124
105
-
### Sample output
125
+
####Sample Output
106
126
107
127
Running the code above will print something like this:
108
128
@@ -117,12 +137,16 @@ keev <AWP (HS) (WB)> to1nou
117
137
...
118
138
```
119
139
120
-
### More examples
140
+
### More Examples
121
141
122
142
Check out the [examples](examples) folder for more examples, like [how to generate heatmaps](examples/heatmap) like this one:
@@ -156,7 +180,7 @@ Here are some benchmark results from a system with an Intel i7 6700k CPU and a S
156
180
157
181
*That's almost 1.5 hours of gameplay per second when parsing in parallel (recorded at 64 ticks per second) - or 25 minues per second when only parsing a single demo at a time.*
158
182
159
-
### Raw output
183
+
### Raw Output
160
184
161
185
```
162
186
$ go test -run _NONE_ -bench . -benchtime 30s -benchmem -concurrentdemos 8
@@ -178,7 +202,7 @@ ok github.com/markus-wa/demoinfocs-golang 134.244s
178
202
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/markus-wa/demoinfocs-golang/tags).
179
203
There is one caveat however: Beta features - which are marked as such via comments and in release notes - may change in minor releases.
180
204
181
-
## Projects using demoinfocs-golang
205
+
## Projects Using demoinfocs-golang
182
206
183
207
-[noesis.gg](https://www.noesis.gg/) - A suite of explorative tools to help you analyze and improve your CS:GO performance
184
208
-[esportal.se](https://beta.esportal.se/) - An alternative Matchmaking service that aims to provide a friendly environment free from trolls and misbehaving individuals
@@ -195,7 +219,7 @@ If your project is using this library feel free to submit a PR or send a message
195
219
196
220
## Development
197
221
198
-
### Git hooks
222
+
### Git Hooks
199
223
200
224
To install some (optional, but quite handy) `pre-commit` and `pre-push` hooks, you can run the following script.
201
225
@@ -211,7 +235,7 @@ To install some (optional, but quite handy) `pre-commit` and `pre-push` hooks, y
211
235
212
236
### Testing
213
237
214
-
#### Unit tests
238
+
#### Unit Tests
215
239
216
240
For any new features, [Test Driven Development](https://medium.com/@pierreprinetti/test-driven-development-in-go-baeab5adb468) should be practiced where possible.
217
241
However, due to some design flaws in some parts of the code it's currently not always practical to do so.
@@ -222,7 +246,7 @@ Running unit tests:
222
246
# or (identical)
223
247
go test -short ./...
224
248
225
-
#### Regression tests
249
+
#### Regression Tests
226
250
227
251
For the full regression suite you will need to download the test demo-set.
The file [`test/default.golden`](https://github.com/markus-wa/demoinfocs-golang/blob/master/test/default.golden) file contains a serialized output of all expected game events in `test/cs-demos/default.dem`.
240
264
@@ -254,15 +278,15 @@ To change the default debugging behavior, Go's `ldflags` parameter can be used.
254
278
255
279
Check out `debug_on.go` for any other settings that can be changed.
256
280
257
-
### Generating interfaces
281
+
### Generating Interfaces
258
282
259
283
We generate interfaces such as `GameState` from structs to make it easier to keep docs in synch over structs and interfaces.
260
284
For this we use [@vburenin](https://github.com/vburenin)'s [`ifacemaker`](https://github.com/vburenin/ifacemaker) tool.
261
285
262
286
You can download the latest version [here](https://github.com/vburenin/ifacemaker/releases).
263
287
After adding it to your `PATH` you can use `scripts/generate-interfaces.sh` to update interfaces.
264
288
265
-
### Generating protobuf code
289
+
### Generating Protobuf Code
266
290
267
291
Should you need to re-generate the protobuf generated code in the `msg` package, you will need the following tools:
0 commit comments