From 11a2fdc644d7acd9d0cc6b57d238109a75105117 Mon Sep 17 00:00:00 2001 From: Daniele Sluijters Date: Sun, 5 May 2019 01:21:17 +0200 Subject: [PATCH] :sparkles: Switch to lib.hemtjan.st imports --- client/device.go | 7 ++++--- cmd/demo/main.go | 6 +++--- cmd/explorer/main.go | 6 +++--- device/device.go | 4 ++-- device/featureTransport.go | 2 +- feature/feature.go | 2 +- go.mod | 10 +++++----- go.sum | 18 +++++++++--------- server/device.go | 4 ++-- server/fake_device.go | 4 ++-- server/manager.go | 4 ++-- testutils/docker.go | 2 +- transport/mqtt/flags.go | 2 +- transport/mqtt/interface.go | 2 +- transport/mqtt/message.go | 2 +- transport/mqtt/message_integration_test.go | 2 +- transport/mqtt/message_test.go | 4 ++-- transport/mqtt/mqtt.go | 4 ++-- 18 files changed, 43 insertions(+), 42 deletions(-) diff --git a/client/device.go b/client/device.go index f025c9d..028c99b 100644 --- a/client/device.go +++ b/client/device.go @@ -1,10 +1,11 @@ -package client +package client // import "lib.hemtjan.st/client" import ( "encoding/json" "errors" - "github.com/hemtjanst/bibliotek/device" - "github.com/hemtjanst/bibliotek/feature" + + "lib.hemtjan.st/device" + "lib.hemtjan.st/feature" ) // Device in client package is used by applications that are talking to the actual devices, diff --git a/cmd/demo/main.go b/cmd/demo/main.go index 5160270..b95cbd4 100644 --- a/cmd/demo/main.go +++ b/cmd/demo/main.go @@ -11,9 +11,9 @@ import ( "encoding/json" "errors" "flag" - "github.com/hemtjanst/bibliotek/client" - "github.com/hemtjanst/bibliotek/device" - "github.com/hemtjanst/bibliotek/transport/mqtt" + "lib.hemtjan.st/client" + "lib.hemtjan.st/device" + "lib.hemtjan.st/transport/mqtt" "io/ioutil" "log" "os" diff --git a/cmd/explorer/main.go b/cmd/explorer/main.go index df85009..f3ce486 100644 --- a/cmd/explorer/main.go +++ b/cmd/explorer/main.go @@ -3,14 +3,14 @@ package main import ( "context" "flag" - "github.com/hemtjanst/bibliotek/client" + "lib.hemtjan.st/client" "log" "os" "os/signal" "syscall" - "github.com/hemtjanst/bibliotek/server" - "github.com/hemtjanst/bibliotek/transport/mqtt" + "lib.hemtjan.st/server" + "lib.hemtjan.st/transport/mqtt" ) func main() { diff --git a/device/device.go b/device/device.go index 7a32198..abf21b4 100644 --- a/device/device.go +++ b/device/device.go @@ -1,11 +1,11 @@ -package device +package device // import "lib.hemtjan.st/device" import ( "errors" "fmt" "strconv" - "github.com/hemtjanst/bibliotek/feature" + "lib.hemtjan.st/feature" ) type Info struct { diff --git a/device/featureTransport.go b/device/featureTransport.go index da8b62c..119a951 100644 --- a/device/featureTransport.go +++ b/device/featureTransport.go @@ -1,6 +1,6 @@ package device -import "github.com/hemtjanst/bibliotek/feature" +import "lib.hemtjan.st/feature" func (d *Device) SubscribeFeature(topic string) chan []byte { return d.Transport.Subscribe(topic) diff --git a/feature/feature.go b/feature/feature.go index 7721896..b9ed63c 100644 --- a/feature/feature.go +++ b/feature/feature.go @@ -1,4 +1,4 @@ -package feature +package feature // import "lib.hemtjan.st/feature" import ( "strconv" diff --git a/go.mod b/go.mod index 33b1491..060bf94 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/hemtjanst/bibliotek +module lib.hemtjan.st go 1.12 @@ -7,14 +7,14 @@ require ( github.com/Microsoft/go-winio v0.4.12 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/cenkalti/backoff v2.1.1+incompatible // indirect - github.com/containerd/continuity v0.0.0-20181203112020-004b46473808 // indirect + github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc // indirect github.com/docker/go-connections v0.4.0 // indirect - github.com/docker/go-units v0.3.3 // indirect + github.com/docker/go-units v0.4.0 // indirect github.com/goiiot/libmqtt v0.0.0-20181213095547-6fed8272b13b - github.com/google/go-cmp v0.2.0 // indirect + github.com/google/go-cmp v0.3.0 // indirect github.com/google/uuid v1.1.1 github.com/gotestyourself/gotestyourself v2.2.0+incompatible // indirect - github.com/lib/pq v1.0.0 // indirect + github.com/lib/pq v1.1.1 // indirect github.com/opencontainers/go-digest v1.0.0-rc1 // indirect github.com/opencontainers/image-spec v1.0.1 // indirect github.com/opencontainers/runc v0.1.1 // indirect diff --git a/go.sum b/go.sum index 396c534..67f14df 100644 --- a/go.sum +++ b/go.sum @@ -10,8 +10,8 @@ github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx2 github.com/cenkalti/backoff v2.1.1+incompatible h1:tKJnvO2kl0zmb/jA5UKAt4VoEVw1qxKWjE/Bpp46npY= github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/containerd/continuity v0.0.0-20181203112020-004b46473808 h1:4BX8f882bXEDKfWIf0wa8HRvpnBoPszJJXL+TVbBw4M= -github.com/containerd/continuity v0.0.0-20181203112020-004b46473808/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc h1:TP+534wVlf61smEIq1nwLLAjQVEK2EADoW3CX9AuT+8= +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/coreos/bbolt v1.3.0/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -23,8 +23,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.3.3 h1:Xk8S3Xj5sLGlG5g67hJmYMmUgXv5N4PhkjJHHqrwnTk= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/eclipse/paho.mqtt.golang v1.1.1 h1:iPJYXJLaViCshRTW/PSqImSS6HJ2Rf671WR0bXZ2GIU= github.com/eclipse/paho.mqtt.golang v1.1.1/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -38,8 +38,8 @@ github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff/go.mod h1:cIg4er github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -53,8 +53,8 @@ github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22 github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.1.1 h1:sJZmqHoEaY7f+NPP8pgLB/WxulyR3fewgCM2qaSlBb4= +github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -81,6 +81,7 @@ github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4k github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -101,7 +102,6 @@ golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181207154023-610586996380 h1:zPQexyRtNYBc7bcHmehl1dH6TB3qn8zytv8cBGLDNY0= golang.org/x/net v0.0.0-20181207154023-610586996380/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/server/device.go b/server/device.go index 4938d63..6ba06b2 100644 --- a/server/device.go +++ b/server/device.go @@ -1,8 +1,8 @@ package server import ( - "github.com/hemtjanst/bibliotek/device" - "github.com/hemtjanst/bibliotek/feature" + "lib.hemtjan.st/device" + "lib.hemtjan.st/feature" ) // Device is used by applications that monitor or send commands to the diff --git a/server/fake_device.go b/server/fake_device.go index 2e8b56a..2d01f24 100644 --- a/server/fake_device.go +++ b/server/fake_device.go @@ -2,8 +2,8 @@ package server import ( "errors" - "github.com/hemtjanst/bibliotek/device" - "github.com/hemtjanst/bibliotek/feature" + "lib.hemtjan.st/device" + "lib.hemtjan.st/feature" ) type FakeDevice struct { diff --git a/server/manager.go b/server/manager.go index e7e3704..6306389 100644 --- a/server/manager.go +++ b/server/manager.go @@ -1,4 +1,4 @@ -package server +package server // import "lib.hemtjan.st/server" import ( "context" @@ -7,7 +7,7 @@ import ( "strings" "sync" - "github.com/hemtjanst/bibliotek/device" + "lib.hemtjan.st/device" ) // Transport is the server's transport diff --git a/testutils/docker.go b/testutils/docker.go index 8325dae..2f1bfcd 100644 --- a/testutils/docker.go +++ b/testutils/docker.go @@ -1,4 +1,4 @@ -package testutils +package testutils // import "lib.hemtjan.st/testutils" import ( "fmt" diff --git a/transport/mqtt/flags.go b/transport/mqtt/flags.go index 491efa0..693b2d2 100644 --- a/transport/mqtt/flags.go +++ b/transport/mqtt/flags.go @@ -42,7 +42,7 @@ type FlagBoolFunc func(name string, def bool, usage string) *bool // import ( // "flag" // "context" -// "github.com/hemtjanst/bibliotek/transport/mqtt" +// "lib.hemtjan.st/transport/mqtt" // ) // func main() { // myCustomFlag := flag.String("custom", "", "Set up your own flags here") diff --git a/transport/mqtt/interface.go b/transport/mqtt/interface.go index 757680d..4d23cf8 100644 --- a/transport/mqtt/interface.go +++ b/transport/mqtt/interface.go @@ -1,6 +1,6 @@ package mqtt -import "github.com/hemtjanst/bibliotek/device" +import "lib.hemtjan.st/device" type MQTT interface { TopicName(t EventType) string diff --git a/transport/mqtt/message.go b/transport/mqtt/message.go index cd3fa77..6540e0e 100644 --- a/transport/mqtt/message.go +++ b/transport/mqtt/message.go @@ -5,7 +5,7 @@ import ( "log" "github.com/goiiot/libmqtt" - "github.com/hemtjanst/bibliotek/device" + "lib.hemtjan.st/device" ) type EventType int diff --git a/transport/mqtt/message_integration_test.go b/transport/mqtt/message_integration_test.go index 3ec578f..c6df13b 100644 --- a/transport/mqtt/message_integration_test.go +++ b/transport/mqtt/message_integration_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/hemtjanst/bibliotek/testutils" + "lib.hemtjan.st/testutils" "github.com/stretchr/testify/assert" ) diff --git a/transport/mqtt/message_test.go b/transport/mqtt/message_test.go index 59c50e6..7b22a18 100644 --- a/transport/mqtt/message_test.go +++ b/transport/mqtt/message_test.go @@ -6,8 +6,8 @@ import ( "time" "github.com/goiiot/libmqtt" - "github.com/hemtjanst/bibliotek/device" - "github.com/hemtjanst/bibliotek/feature" + "lib.hemtjan.st/device" + "lib.hemtjan.st/feature" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/transport/mqtt/mqtt.go b/transport/mqtt/mqtt.go index 32b98d3..5d74d0f 100644 --- a/transport/mqtt/mqtt.go +++ b/transport/mqtt/mqtt.go @@ -1,4 +1,4 @@ -package mqtt +package mqtt // import "lib.hemtjan.st/transport/mqtt" import ( "context" @@ -9,7 +9,7 @@ import ( "time" "github.com/goiiot/libmqtt" - "github.com/hemtjanst/bibliotek/device" + "lib.hemtjan.st/device" ) type Packet libmqtt.PublishPacket