From bbcd750d5b206bdcfd64b99d49279b52b5c9840f Mon Sep 17 00:00:00 2001 From: M-A Date: Thu, 2 Mar 2017 20:21:56 -0500 Subject: [PATCH] Replace github.com/google with periph.io/x (#110) This makes periph.io/x/periph as the repository root so it is not tied to the Google organisation anymore. --- README.md | 28 ++++++++++---------- devices/apa102/apa102.go | 4 +-- devices/apa102/apa102_test.go | 4 +-- devices/bme280/bme280.go | 8 +++--- devices/bme280/bme280_test.go | 6 ++--- devices/devicestest/display.go | 2 +- devices/lirc/lirc.go | 4 +-- devices/ssd1306/ssd1306.go | 8 +++--- devices/ssd1306/ssd1306_test.go | 6 ++--- devices/tm1637/tm1637.go | 4 +-- devices/tm1637/tm1637_test.go | 6 ++--- experimental/devices/bitbang/i2c.go | 6 ++--- experimental/devices/bitbang/spi.go | 6 ++--- experimental/devices/ds18b20/ds18b20.go | 4 +-- experimental/devices/ds18b20/ds18b20_test.go | 8 +++--- experimental/devices/ds248x/dev.go | 4 +-- experimental/devices/ds248x/ds248x.go | 2 +- experimental/devices/ds248x/ds248x_test.go | 4 +-- experimental/devices/piblaster/piblaster.go | 2 +- 19 files changed, 58 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index b798f83..61e7377 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ * [doc/users/](doc/users/) for ready-to-use tools. * [doc/apps/](doc/apps/) to use `periph` as a library. The complete API documentation, including examples, is at - [![GoDoc](https://godoc.org/github.com/google/periph?status.svg)](https://godoc.org/github.com/google/periph). + [![GoDoc](https://godoc.org/periph.io/x/periph?status.svg)](https://godoc.org/periph.io/x/periph). * [doc/drivers/](doc/drivers/) to expand the list of supported hardware. @@ -27,7 +27,7 @@ for more info on configuring the host and using the included tools. ```bash # Retrieve and install all the commands at once: -go get github.com/google/periph/cmd/... +go get periph.io/x/periph/cmd/... # List the host drivers registered and/or initialized: periph-info # List the known headers: @@ -49,8 +49,8 @@ package main import ( "time" - "github.com/google/periph/conn/gpio" - "github.com/google/periph/host" + "periph.io/x/periph/conn/gpio" + "periph.io/x/periph/host" ) func main() { @@ -64,11 +64,11 @@ func main() { The following are synonyms, use the form you prefer: * Runtime discovery: - * [`gpio.ByNumber(13)`](https://godoc.org/github.com/google/periph/conn/gpio/#ByNumber) or [`gpio.ByName("13")`](https://godoc.org/github.com/google/periph/conn/gpio/#ByName) - * [`gpio.ByName("GPIO13")`](https://godoc.org/github.com/google/periph/conn/gpio/#ByName) + * [`gpio.ByNumber(13)`](https://godoc.org/periph.io/x/periph/conn/gpio/#ByNumber) or [`gpio.ByName("13")`](https://godoc.org/periph.io/x/periph/conn/gpio/#ByName) + * [`gpio.ByName("GPIO13")`](https://godoc.org/periph.io/x/periph/conn/gpio/#ByName) * Using global variables: - * [`rpi.P1_33`](https://godoc.org/github.com/google/periph/host/rpi#/P1_33) to select the pin via its position on the board - * [`bcm283x.GPIO13`](https://godoc.org/github.com/google/periph/host/bcm283x/#GPIO13) + * [`rpi.P1_33`](https://godoc.org/periph.io/x/periph/host/rpi#/P1_33) to select the pin via its position on the board + * [`bcm283x.GPIO13`](https://godoc.org/periph.io/x/periph/host/bcm283x/#GPIO13) This example uses basically no CPU: the `Out()` call doesn't call into the kernel. Instead it directly changes the GPIO memory mapped register. @@ -108,12 +108,12 @@ Google Contributor License. Please see on each platform. 3. ... yet doesn't get in the way of platform specific code. * e.g. A user can use statically typed global variables - [rpi.P1_3](https://godoc.org/github.com/google/periph/host/rpi#pkg-variables), - [bcm283x.GPIO2](https://godoc.org/github.com/google/periph/host/bcm283x#Pin) + [rpi.P1_3](https://godoc.org/periph.io/x/periph/host/rpi#pkg-variables), + [bcm283x.GPIO2](https://godoc.org/periph.io/x/periph/host/bcm283x#Pin) to refer to the exact same pin on a Raspberry Pi. 3. The user can chose to optimize for performance instead of usability. * e.g. - [apa102.Dev](https://godoc.org/github.com/google/periph/devices/apa102#Dev) + [apa102.Dev](https://godoc.org/periph.io/x/periph/devices/apa102#Dev) exposes both high level [draw.Image](https://golang.org/pkg/image/draw/#Image) to draw an image and low level [io.Writer](https://golang.org/pkg/io/#Writer) to write raw RGB @@ -124,15 +124,15 @@ Google Contributor License. Please see "component": one for the CPU, one for the board headers, one for each bus and sensor, etc. 5. Extensible via a [driver - registry](https://godoc.org/github.com/google/periph#Register). + registry](https://godoc.org/periph.io/x/periph#Register). * e.g. a user can inject a custom driver to expose more pins, headers, etc. A USB device (like an FT232H) can expose headers _in addition_ to the headers found on the host. 6. The drivers must use the fastest possible implementation. * e.g. both - [allwinner](https://godoc.org/github.com/google/periph/host/allwinner) + [allwinner](https://godoc.org/periph.io/x/periph/host/allwinner) and - [bcm283x](https://godoc.org/github.com/google/periph/host/bcm283x) + [bcm283x](https://godoc.org/periph.io/x/periph/host/bcm283x) leverage sysfs gpio to expose interrupt driven edge detection, yet use memory mapped GPIO registers to perform single-cycle reads and writes. diff --git a/devices/apa102/apa102.go b/devices/apa102/apa102.go index c97a911..9f7ebb4 100644 --- a/devices/apa102/apa102.go +++ b/devices/apa102/apa102.go @@ -9,8 +9,8 @@ import ( "image" "image/color" - "github.com/google/periph/conn/spi" - "github.com/google/periph/devices" + "periph.io/x/periph/conn/spi" + "periph.io/x/periph/devices" ) // maxOut is the maximum intensity of each channel on a APA102 LED. diff --git a/devices/apa102/apa102_test.go b/devices/apa102/apa102_test.go index fb0bd06..cae0f5c 100644 --- a/devices/apa102/apa102_test.go +++ b/devices/apa102/apa102_test.go @@ -13,8 +13,8 @@ import ( "log" "testing" - "github.com/google/periph/conn/spi" - "github.com/google/periph/conn/spi/spitest" + "periph.io/x/periph/conn/spi" + "periph.io/x/periph/conn/spi/spitest" ) func TestRamp(t *testing.T) { diff --git a/devices/bme280/bme280.go b/devices/bme280/bme280.go index df77a5a..249aa06 100644 --- a/devices/bme280/bme280.go +++ b/devices/bme280/bme280.go @@ -12,10 +12,10 @@ package bme280 import ( "errors" - "github.com/google/periph/conn" - "github.com/google/periph/conn/i2c" - "github.com/google/periph/conn/spi" - "github.com/google/periph/devices" + "periph.io/x/periph/conn" + "periph.io/x/periph/conn/i2c" + "periph.io/x/periph/conn/spi" + "periph.io/x/periph/devices" ) // Oversampling affects how much time is taken to measure each of temperature, diff --git a/devices/bme280/bme280_test.go b/devices/bme280/bme280_test.go index 338d3d9..ebc86bb 100644 --- a/devices/bme280/bme280_test.go +++ b/devices/bme280/bme280_test.go @@ -9,9 +9,9 @@ import ( "log" "testing" - "github.com/google/periph/conn/i2c" - "github.com/google/periph/conn/i2c/i2ctest" - "github.com/google/periph/devices" + "periph.io/x/periph/conn/i2c" + "periph.io/x/periph/conn/i2c/i2ctest" + "periph.io/x/periph/devices" ) // Real data extracted from a device. diff --git a/devices/devicestest/display.go b/devices/devicestest/display.go index 7cbfa81..dc3d96e 100644 --- a/devices/devicestest/display.go +++ b/devices/devicestest/display.go @@ -10,7 +10,7 @@ import ( "image/color" "image/draw" - "github.com/google/periph/devices" + "periph.io/x/periph/devices" ) // Display is a fake devices.Display. diff --git a/devices/lirc/lirc.go b/devices/lirc/lirc.go index 134bf45..5ed02bc 100644 --- a/devices/lirc/lirc.go +++ b/devices/lirc/lirc.go @@ -14,8 +14,8 @@ import ( "strings" "sync" - "github.com/google/periph/conn/gpio" - "github.com/google/periph/conn/ir" + "periph.io/x/periph/conn/gpio" + "periph.io/x/periph/conn/ir" ) // Conn is an open port to lirc. diff --git a/devices/ssd1306/ssd1306.go b/devices/ssd1306/ssd1306.go index bac0782..af4ce7d 100644 --- a/devices/ssd1306/ssd1306.go +++ b/devices/ssd1306/ssd1306.go @@ -41,10 +41,10 @@ import ( "io" "log" - "github.com/google/periph/conn/i2c" - "github.com/google/periph/conn/spi" - "github.com/google/periph/devices" - "github.com/google/periph/devices/ssd1306/image1bit" + "periph.io/x/periph/conn/i2c" + "periph.io/x/periph/conn/spi" + "periph.io/x/periph/devices" + "periph.io/x/periph/devices/ssd1306/image1bit" ) // FrameRate determines scrolling speed. diff --git a/devices/ssd1306/ssd1306_test.go b/devices/ssd1306/ssd1306_test.go index d6067ee..1100863 100644 --- a/devices/ssd1306/ssd1306_test.go +++ b/devices/ssd1306/ssd1306_test.go @@ -14,9 +14,9 @@ import ( "golang.org/x/image/font/basicfont" "golang.org/x/image/math/fixed" - "github.com/google/periph/conn/i2c" - "github.com/google/periph/conn/i2c/i2ctest" - "github.com/google/periph/devices/ssd1306/image1bit" + "periph.io/x/periph/conn/i2c" + "periph.io/x/periph/conn/i2c/i2ctest" + "periph.io/x/periph/devices/ssd1306/image1bit" ) func TestDrawGray(t *testing.T) { diff --git a/devices/tm1637/tm1637.go b/devices/tm1637/tm1637.go index b7f3988..1793523 100644 --- a/devices/tm1637/tm1637.go +++ b/devices/tm1637/tm1637.go @@ -14,8 +14,8 @@ import ( "runtime" "time" - "github.com/google/periph/conn/gpio" - "github.com/google/periph/host/cpu" + "periph.io/x/periph/conn/gpio" + "periph.io/x/periph/host/cpu" ) // Clock converts time to a slice of bytes as segments. diff --git a/devices/tm1637/tm1637_test.go b/devices/tm1637/tm1637_test.go index db6efab..11c7623 100644 --- a/devices/tm1637/tm1637_test.go +++ b/devices/tm1637/tm1637_test.go @@ -8,9 +8,9 @@ import ( "log" "testing" - "github.com/google/periph/conn/gpio" - "github.com/google/periph/conn/gpio/gpiotest" - "github.com/google/periph/host" + "periph.io/x/periph/conn/gpio" + "periph.io/x/periph/conn/gpio/gpiotest" + "periph.io/x/periph/host" ) func TestNew(t *testing.T) { diff --git a/experimental/devices/bitbang/i2c.go b/experimental/devices/bitbang/i2c.go index baf2f13..b9aa7ea 100644 --- a/experimental/devices/bitbang/i2c.go +++ b/experimental/devices/bitbang/i2c.go @@ -15,9 +15,9 @@ import ( "sync" "time" - "github.com/google/periph/conn/gpio" - "github.com/google/periph/conn/i2c" - "github.com/google/periph/host/cpu" + "periph.io/x/periph/conn/gpio" + "periph.io/x/periph/conn/i2c" + "periph.io/x/periph/host/cpu" ) // Use SkipAddr to skip the address from being sent. diff --git a/experimental/devices/bitbang/spi.go b/experimental/devices/bitbang/spi.go index 63ef117..0c8cce4 100644 --- a/experimental/devices/bitbang/spi.go +++ b/experimental/devices/bitbang/spi.go @@ -17,9 +17,9 @@ import ( "sync" "time" - "github.com/google/periph/conn/gpio" - "github.com/google/periph/conn/spi" - "github.com/google/periph/host/cpu" + "periph.io/x/periph/conn/gpio" + "periph.io/x/periph/conn/spi" + "periph.io/x/periph/host/cpu" ) // SPI represents a SPI master implemented as bit-banging on 3 or 4 GPIO pins. diff --git a/experimental/devices/ds18b20/ds18b20.go b/experimental/devices/ds18b20/ds18b20.go index 6d63bcb..aa2eb91 100644 --- a/experimental/devices/ds18b20/ds18b20.go +++ b/experimental/devices/ds18b20/ds18b20.go @@ -25,8 +25,8 @@ import ( "errors" "time" - "github.com/google/periph/devices" - "github.com/google/periph/experimental/conn/onewire" + "periph.io/x/periph/devices" + "periph.io/x/periph/experimental/conn/onewire" ) // New returns an object that communicates over 1-wire to the DS18B20 sensor with the diff --git a/experimental/devices/ds18b20/ds18b20_test.go b/experimental/devices/ds18b20/ds18b20_test.go index cef656e..008cbf2 100644 --- a/experimental/devices/ds18b20/ds18b20_test.go +++ b/experimental/devices/ds18b20/ds18b20_test.go @@ -9,10 +9,10 @@ import ( "testing" "time" - "github.com/google/periph/devices" - "github.com/google/periph/experimental/conn/onewire" - "github.com/google/periph/experimental/conn/onewire/onewiretest" - "github.com/google/periph/host" + "periph.io/x/periph/devices" + "periph.io/x/periph/experimental/conn/onewire" + "periph.io/x/periph/experimental/conn/onewire/onewiretest" + "periph.io/x/periph/host" ) // TestMain lets periph load all drivers and then runs the tests. diff --git a/experimental/devices/ds248x/dev.go b/experimental/devices/ds248x/dev.go index e48cf77..fe968aa 100644 --- a/experimental/devices/ds248x/dev.go +++ b/experimental/devices/ds248x/dev.go @@ -9,8 +9,8 @@ import ( "sync" "time" - "github.com/google/periph/conn" - "github.com/google/periph/experimental/conn/onewire" + "periph.io/x/periph/conn" + "periph.io/x/periph/experimental/conn/onewire" ) // Dev is a handle to a ds248x device and it implements the onewire.Bus interface. diff --git a/experimental/devices/ds248x/ds248x.go b/experimental/devices/ds248x/ds248x.go index 0b71f4b..a65ed87 100644 --- a/experimental/devices/ds248x/ds248x.go +++ b/experimental/devices/ds248x/ds248x.go @@ -16,7 +16,7 @@ import ( "fmt" "time" - "github.com/google/periph/conn/i2c" + "periph.io/x/periph/conn/i2c" ) // PupOhm controls the strength of the passive pull-up resistor diff --git a/experimental/devices/ds248x/ds248x_test.go b/experimental/devices/ds248x/ds248x_test.go index cf32740..961c2a3 100644 --- a/experimental/devices/ds248x/ds248x_test.go +++ b/experimental/devices/ds248x/ds248x_test.go @@ -8,8 +8,8 @@ import ( "fmt" "testing" - "github.com/google/periph/conn/i2c" - "github.com/google/periph/conn/i2c/i2ctest" + "periph.io/x/periph/conn/i2c" + "periph.io/x/periph/conn/i2c/i2ctest" ) // TestInit tests the initialization of a ds2483 using a recording. diff --git a/experimental/devices/piblaster/piblaster.go b/experimental/devices/piblaster/piblaster.go index d82bac4..67ca68c 100644 --- a/experimental/devices/piblaster/piblaster.go +++ b/experimental/devices/piblaster/piblaster.go @@ -21,7 +21,7 @@ import ( "io" "os" - "github.com/google/periph/conn/gpio" + "periph.io/x/periph/conn/gpio" ) // SetPWM enables and sets the PWM duty on a GPIO output pin via piblaster.