mirror of https://github.com/google/oss-fuzz.git
Golang modules documentation (#4711)
* Clones golang-protobuf into the expected directory * Improves the documentation for golang projects with modules
This commit is contained in:
parent
d126898bde
commit
6c9bd20f54
|
@ -69,6 +69,13 @@ your Dockerfile.
|
|||
RUN go get github.com/ianlancetaylor/demangle
|
||||
```
|
||||
|
||||
In the case you are using modules, the best practice is to `git clone` the repository into the expected `$GOPATH/src` directory.
|
||||
|
||||
A usage example from go-coredns project is
|
||||
```dockerfile
|
||||
RUN git clone --depth 1 https://github.com/coredns/coredns $GOPATH/src/github.com/coredns/coredns
|
||||
```
|
||||
|
||||
### build.sh
|
||||
|
||||
In order to build a Go fuzz target, you need to call `go-fuzz`
|
||||
|
|
|
@ -20,6 +20,6 @@ ENV GO111MODULE="on"
|
|||
ENV GOFUZZ111MODULE="on"
|
||||
|
||||
RUN go get google.golang.org/protobuf/proto
|
||||
RUN git clone https://go.googlesource.com/protobuf $SRC/protobuf
|
||||
RUN git clone https://go.googlesource.com/protobuf $GOPATH/src/google.golang.org/protobuf
|
||||
COPY build.sh $SRC/
|
||||
WORKDIR $SRC/protobuf
|
||||
WORKDIR $GOPATH/src/google.golang.org/protobuf
|
||||
|
|
Loading…
Reference in New Issue