Age | Commit message (Collapse) | Author |
|
The repository names for soundbox are named as below:
- app: soundbox-app
- Go library module: soundbox-go
- Device: soundbox
The Go module names were:
- app: xengineering.eu/soundbox/app
- Go library module: xengineering.eu/soundbox
This does not make clear which module is related to which repository
since the names are different. Thus it should be changed to:
- app: xengineering.eu/soundbox-app
- Go library module: xengineering.eu/soundbox-go
The import statement for the library is then:
import "xengineering.eu/soundbox-go/soundbox"
This is a bit longer but it keeps the property that the library is
referenced inside the code by the simple name `soundbox`.
|
|
This example is completely based on the StreamURLContext() function.
Thus it should go to the respective test file.
|
|
|
|
This should be the primary public API of the library to stream web radio
to soundbox devices.
|
|
This data structure only contained a net.HardwareAddr and did not
provide much more useful functionality. Thus the net.HardwareAddr type
should be used directly.
|
|
It is planned to provide a function for streaming. Thus the streaming
port is not required to be exposed. If there is a use case the streaming
port can be exposed again.
|
|
This is required as a temporary solution to guess the correct interface.
|
|
It is expected that further ports (maybe for information via HTTP) are
added in the future.
To keep the public API stable this should be taken into account before
the first release.
|
|
|
|
Since the module name is `soundbox` naming the primary type of the
module also `Soundbox` is redundant. Following similar code from the Go
standard library this struct is renamed to `Client`.
|
|
The file did not work properly if used via Git commit hook symlink.
|
|
This script should be usable as a Git pre-commit hook to make sure every
commit has a running test suite and is well formatted.
This commit starts with running the test suite for the module.
|
|
This gives a brief introduction how the library should be used.
Furthermore it has an output string comment making sure with the test
suite that it actually works.
|
|
This splits the soundbox.NewSoundbox() function into two smaller
functions.
|
|
Using testing.Errorf() does not stop the test. This was never wanted.
|
|
To communicate with soundbox devices it is required to convert the known
device MAC address (printed on the case) to an IPv6 link-local address.
|
|
|
|
This gives a better overview of the existing repositories.
|
|
Go modules should be named with a single word if possible (see the
[standard libraray][1] as a reference example). Furthermore the module
name will be present in the code very often and thus length is a
critical point.
The repository and project should still be named `soundbox-go` to
distinguish it from the device repository [soundbox][2] and the
application repository [soundbox-app][3].
[1]: https://pkg.go.dev/std
[2]: https://cgit.xengineering.eu/soundbox
[3]: https://cgit.xengineering.eu/soundbox-app
|
|
It is not expected that this library will be so big that multiple
packages make sense. Thus it should start only with the main package.
|
|
This makes this repository a Go module.
|
|
This only adds the `Soundbox` struct type which has a `net.HardwareAddr`
to identify it together with a constructor and a unit test.
|
|
|
|
|