The project is having a make over!
Not only are we leaving 2020 behind, we are also leaving periph.io/x/periph v3.6.7 behind.
The monolithical git repository github.com/google/periph is now split up in multiple smaller git repositories.
The translation is:
To simplify the transition, no API was changed. The translation is valid for v3.6.7.
periph.io/x/periph will continue working but will not be updated anymore.
The new packages require go1.13 or later.
Run the following in bash in your repository:
git ls-files -z -- "*.go" | xargs -0 -L 1 sed -i 's#\([^a-zA-Z]\)periph\.Driver#\1driver.Impl#g'
git ls-files -z -- . | xargs -0 -L 1 sed -i 's#periph\.io/x/periph/conn#periph.io/x/conn/v3#g'
git ls-files -z -- . | xargs -0 -L 1 sed -i 's#periph\.io/x/periph/experimental/conn#periph.io/x/conn/v3#g'
git ls-files -z -- . | xargs -0 -L 1 sed -i 's#periph\.io/x/periph/host#periph.io/x/host/v3#g'
git ls-files -z -- . | xargs -0 -L 1 sed -i 's#periph\.io/x/periph/devices#periph.io/x/devices/v3#g'
git ls-files -z -- . | xargs -0 -L 1 sed -i 's#periph\.io/x/periph/experimental/devices#periph.io/x/devices/v3#g'
git ls-files -z -- . | xargs -0 -L 1 sed -i 's#"periph\.io/x/periph"#"periph.io/x/conn/v3/driver/driverreg"#g'
git ls-files -z -- "*.go" | xargs -0 -L 1 sed -i 's#\([^a-zA-Z]\)periph\.\([A-Z]\)#\1driverreg.\2#g'
git checkout HEAD -- go.mod go.sum
go mod tidy
goimports -w .
go test ./...
You can get goimports via cd; go get golang.org/x/tools/cmd/goimports
Having issues? Please reach out on the slack channel and we’ll update the instructions. Thanks!
If you’ve read this far, you’re likely interested in the rationale. Here’s the goals:
extra will be migrated later. Periph prided itself from not having external dependencies but this will change (regress?). This should be easier to manage now that periph is a proper go modules compatible project. Merging extra will likely result in a host/v4 release.
GitHub issues will be manually migrated to the relevant repository.