github.com/osrg/gobgp@v2.0.0+incompatible/BUILD.md (about)

     1  # Development Guide
     2  
     3  ## Building the development environment
     4  
     5  You need a working [Go environment](https://golang.org/doc/install) (1.11 or newer).
     6  
     7  ```bash
     8  $ go get -u github.com/golang/dep/cmd/dep
     9  $ go get github.com/osrg/gobgp
    10  $ cd $GOPATH/src/github.com/osrg/gobgp && dep ensure
    11  ```
    12  
    13  Now ready to modify the code and build two binaries, `cmd/gobgp` and `cmd/gobgpd`.
    14  
    15  ## Layout
    16  
    17  The GoBGP project adopts [Standard Go Project Layout](https://github.com/golang-standards/project-layout).
    18  
    19  ## Changing the gRPC API
    20  
    21  If you change the gRPC API, generate `api/gobgp.pb.go` in the following way:
    22  
    23  ```bash
    24  $ protoc -I ~/protobuf/src -I ${GOBGP}/api --go_out=plugins=grpc:${GOBGP}/api \
    25           ${GOBGP}/api/gobgp.proto ${GOBGP}/api/attribute.proto ${GOBGP}/api/capability.proto
    26  ```