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
git clone git@github.com:micromdm/micromdm && cd micromdm
29
22
make deps
30
23
make
31
24
32
25
# run
33
26
./build/darwin/micromdm -h
27
+
./build/darwin/mdmctl -h
34
28
```
35
29
36
30
## Git workflow
37
-
Go requires that your repo lives in `$GOPATH/src/github.com/micromdm/micromdm` even if you're trying to push to your github fork. To work with a forked copy, use a git remote.
# -u, --set-upstream set upstream for git pull/status
54
-
git push -u groob
44
+
git push -u $username
55
45
```
56
46
57
47
58
-
## If you're new to Go
59
-
60
-
Go is a bit different from other languages in its requirements for how it expects its programmers to organize Go code files in directories.
61
-
First, Go requires a folder, called a workspace (you can name it anything you'd like) to exist for go source, dependencies, etc. Before Go 1.8 the path to this folder must always be set in the environment variable `GOPATH` (example: `export GOPATH=/Users/groob/code/go`). As of Go 1.8 the default `GOPATH` is set to `$HOME/go` but you can still set it to whatever you like.
62
-
Your `GOPATH` must have thee subfolders: `bin`, `pkg`, and `src`. Any code you create must live inside the `src` folder. It's also helpful to add `$GOPATH/bin` to your environment's `PATH` as that is where `go install` will place go binaries that you build. This makes it so that binaries that are insalled can just be invoked by name rather than their full page.
48
+
## Go Resources
63
49
64
50
A few helpful resources for getting started with Go:
65
51
66
52
*[Writing, building, installing, and testing Go code](https://www.youtube.com/watch?v=XCsL89YtqCs)
67
53
*[Resources for new Go programmers](http://dave.cheney.net/resources-for-new-go-programmers)
68
54
*[How I start](https://howistart.org/posts/go/1)
69
55
*[How to write Go code](https://golang.org/doc/code.html)
70
-
*[GOPATH on the go wiki](https://github.com/golang/go/wiki/GOPATH)
71
-
72
-
To build MicroMDM you will need to:
73
-
74
-
1. Download and install [`Go`](https://golang.org/dl/)
75
-
2. Make a workspace directory and set the `GOPATH` as explained above.
76
-
3. Install [`dep`](https://github.com/golang/dep) via the command `go get -u github.com/golang/dep/...`
77
-
Note that `dep` is a very new project itself. If you're running trouble with the `dep ensure` command, ping @groob in the #micromdm channel on Slack.
78
-
4.`mkdir -p $GOPATH/src/github.com/micromdm`
79
-
5.`git clone git@github.com:micromdm/micromdm.git` the project into the above folder.
80
-
The repo must always be in the folder `$GOPATH/src/github.com/micromdm/micromdm` even if you forked the project. Add a git remote to your fork to track upstream.
81
-
6.`dep ensure` The `dep` command will download and install all necessary dependencies for the project to compile.
82
-
7.`go build` or `go install`
83
-
8. File an issue or a pull request if the instructions are unclear or problems pop-up for you.
0 commit comments