Skip to content

Commit 6b89a5e

Browse files
authored
README: getting started section (#213)
1 parent 6df859c commit 6b89a5e

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,23 @@ If you are currently using version 1.x of this library, check out [this wiki pag
3232

3333
The old code is also still available in the [`v1` branch](https://github.com/markus-wa/demoinfocs-golang/tree/v1) if you need it.
3434

35-
## Example
35+
## Getting started
36+
37+
1. Download and install Go 1.11 or newer [from golang.org](https://golang.org/dl/) or via your favourite package manager
38+
39+
2. Create a new Go Modules project
40+
41+
```terminal
42+
mkdir my-project
43+
cd my-project
44+
go mod init github.com/<YOUR_GITHUB_USER>/my-project
45+
# the module name (github.com/<YOUR_GITHUB_USER>/my-project) can always be changed later
46+
# you can also put example.com/my-project or anything else if you don't plan to publish your project
47+
```
48+
49+
3. Create a `main.go` file with the example below
50+
51+
### Example
3652

3753
This is a simple example on how to handle game events using this library.
3854
It prints all kills in a given demo (killer, weapon, victim, was it a wallbang/headshot?) by registering a handler for [`events.Kill`](https://godoc.org/github.com/markus-wa/demoinfocs-golang/events#Kill).

0 commit comments

Comments
 (0)