]> Sergey Matveev's repositories - go-opus.git/commit
feat: build without libopusfile using go build tag
authorRandy Reddig <ydnar@shaderlab.com>
Tue, 13 Aug 2019 21:31:57 +0000 (14:31 -0700)
committerHraban Luyat <hraban@0brg.net>
Fri, 10 Jul 2020 12:54:23 +0000 (13:54 +0100)
commit25a249fbd5adc7094322e8bdf2a92c9c09e39034
tree4896c3e808f27e325b538920041d908b8a58bfe6
parent558c065b07ac0b31b54ec68b5c3a016b887c5549
feat: build without libopusfile using go build tag

This patch introduces a new build tag `nolibopusfile` that conditionally
compiles out the code that imports `libopusfile`. This enables a static
binary build on Alpine Linux, which doesn’t have a static `libopusfile`.

Tests still work:

```sh
go test -tags nolibopusfile ./...
go test ./...
```

We could also have moved all libopusfile related code (i.e. Stream) into
a separate sub-package, but that would break backwards compatibility.
This feature is too unpopular to justify introducing a new major
version.

See also: https://github.com/hraban/opus/pull/24
README.md
callbacks.c
errors.go
stream.go
stream_errors.go [new file with mode: 0644]
stream_test.go
streams_map.go