Skip to content

Commit ee793ec

Browse files
Apply suggestions from code review
Co-authored-by: Daniel Nachun <[email protected]>
1 parent b81e5cc commit ee793ec

File tree

1 file changed

+4
-6
lines changed
  • docs/maintainer/example_recipes

1 file changed

+4
-6
lines changed

docs/maintainer/example_recipes/go.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,25 +61,23 @@ This recipe template supports different features:
6161
- Package licenses of statically linked libraries.
6262
- Ensure only binary is created by using `strict: true` in the `package_contents` tests.
6363

64-
If your package requires `cgo` instead of `go-nocgo`, you can use `${{ compiler("go-cgo") }}` instead to build the package. By default, the `go-nocgo` compiler [is used](https://github.com/conda-forge/staged-recipes/blob/main/.ci_support/linux64.yaml).
64+
If your package requires `cgo` instead of `go-nocgo`, you can use `${{ compiler("go-cgo") }}` instead to build the package. By default, the `go-nocgo` compiler [is used](https://github.com/conda-forge/staged-recipes/blob/main/.ci_support/linux64.yaml). Using `${{ compiler("go-cgo")) }}` also requires `${{ compiler("c") }}` and `${{ stdlib("c") }}` and may require `${{ compiler("cxx") }}` if C++ code is compiled. C/C++ build tools such as `make`, `autoconf`, `automake`, `libtool` or `cmake` may also be needed.
6565

6666
Sometimes, `go-licenses` might fail to detect licenses for some packages. In such cases, you can manually download the license file from the official source and add `--ignore github.com/bad-package/bad-package` to the `go-licenses` invokation. See [here](https://github.com/conda-forge/k9s-feedstock/blob/7929e0d86c829ba2ca172f08926f9fb7e6398247/recipe/recipe.yaml) for an example.
6767

68-
Some packages ship multiple binaries. Then, the `go build` command needs to be run for each binary.
69-
It is increasingly common for the go build command to require specifying a subdirectory, so it would look something like:
68+
Some packages ship multiple binaries, in which case the `go build` command needs to be run separately for each binary.
69+
It is increasingly common for the go build command to require specifying a subdirectory, in which case the build steps would be slightly modified as shown below:
7070

7171
```bash
7272
go-licenses save ./cmd/example-package --save-path ../library_licenses
7373
go build -v -o ${PREFIX}/bin/example-package -ldflags="-s -w" ./cmd/example-package
7474
```
7575

76-
This can vary from project to project.
77-
7876
Some older Go packages that are not using Go modules yet can be converted by using:
7977

8078
```bash
8179
go mod init
8280
go mod tidy
8381
```
8482

85-
Maybe some additional work is required to make older packages buildable with Go modules.
83+
Additional steps maybe required depending on which Go dependency manager the project has been using.

0 commit comments

Comments
 (0)