From 3933e4d43b79877d5e361e5425c6784ec31aee4e Mon Sep 17 00:00:00 2001 From: wgroeneveld Date: Fri, 9 Apr 2021 18:04:04 +0200 Subject: [PATCH] rename master module --- README.md | 4 +++- app/index/handler.go | 2 +- app/mf/mention.go | 2 +- app/mf/microformats.go | 2 +- app/pingback/handler.go | 10 +++++----- app/pingback/send/send.go | 4 ++-- app/pingback/send/send_test.go | 4 ++-- app/pingback/validate.go | 2 +- app/pingback/validate_test.go | 2 +- app/routes.go | 6 +++--- app/server.go | 2 +- app/server_test.go | 2 +- app/webmention/handler.go | 14 +++++++------- app/webmention/{receive => recv}/receive.go | 8 ++++---- app/webmention/{receive => recv}/receive_test.go | 8 ++++---- app/webmention/send/send.go | 8 ++++---- app/webmention/validate.go | 4 ++-- app/webmention/validate_test.go | 4 ++-- go.mod | 2 +- main.go | 2 +- 20 files changed, 47 insertions(+), 45 deletions(-) rename app/webmention/{receive => recv}/receive.go (95%) rename app/webmention/{receive => recv}/receive_test.go (98%) diff --git a/README.md b/README.md index c0c7d75..d8904ce 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # go-jammin' 🥞 +Go module `brainbaking.com/go-jamming`: + > A minimalistic Go-powered jamstack-augmented microservice for webmentions etc -⚠️ **This is a fork of [https://github.com/wgroeneveld/serve-my-jams](serve-my-jams)**, the Node-powered original microservice, which is no longer being maintained. +✅️ **This is a fork of [https://github.com/wgroeneveld/serve-my-jams](serve-my-jams)**, the Node-powered original microservice, which is no longer being maintained. **Are you looking for a way to DO something with this?** See https://github.com/wgroeneveld/jam-my-stack ! diff --git a/app/index/handler.go b/app/index/handler.go index a52d5e5..9b9ed6e 100644 --- a/app/index/handler.go +++ b/app/index/handler.go @@ -5,7 +5,7 @@ import ( "net/http" "fmt" - "github.com/wgroeneveld/go-jamming/common" + "brainbaking.com/go-jamming/common" ) func Handle(conf *common.Config) http.HandlerFunc { diff --git a/app/mf/mention.go b/app/mf/mention.go index 87d04d6..a093029 100644 --- a/app/mf/mention.go +++ b/app/mf/mention.go @@ -3,7 +3,7 @@ package mf import ( "crypto/md5" "fmt" - "github.com/wgroeneveld/go-jamming/common" + "brainbaking.com/go-jamming/common" "net/url" ) diff --git a/app/mf/microformats.go b/app/mf/microformats.go index a3636bb..6cb9816 100644 --- a/app/mf/microformats.go +++ b/app/mf/microformats.go @@ -4,7 +4,7 @@ import ( "strings" "time" "willnorris.com/go/microformats" - "github.com/wgroeneveld/go-jamming/common" + "brainbaking.com/go-jamming/common" ) const ( diff --git a/app/pingback/handler.go b/app/pingback/handler.go index 289e7b5..765981f 100644 --- a/app/pingback/handler.go +++ b/app/pingback/handler.go @@ -4,10 +4,10 @@ package pingback import ( "encoding/xml" "github.com/rs/zerolog/log" - "github.com/wgroeneveld/go-jamming/app/mf" - "github.com/wgroeneveld/go-jamming/app/webmention/receive" - "github.com/wgroeneveld/go-jamming/common" - "github.com/wgroeneveld/go-jamming/rest" + "brainbaking.com/go-jamming/app/mf" + "brainbaking.com/go-jamming/app/webmention/recv" + "brainbaking.com/go-jamming/common" + "brainbaking.com/go-jamming/rest" "io/ioutil" "net/http" ) @@ -33,7 +33,7 @@ func HandlePost(conf *common.Config) http.HandlerFunc { Source: rpc.Source(), Target: rpc.Target(), } - receiver := receive.Receiver{ + receiver := recv.Receiver{ RestClient: &rest.HttpClient{}, Conf: conf, } diff --git a/app/pingback/send/send.go b/app/pingback/send/send.go index 4769ec0..c457fbf 100644 --- a/app/pingback/send/send.go +++ b/app/pingback/send/send.go @@ -2,8 +2,8 @@ package send import ( "github.com/rs/zerolog/log" - "github.com/wgroeneveld/go-jamming/app/mf" - "github.com/wgroeneveld/go-jamming/rest" + "brainbaking.com/go-jamming/app/mf" + "brainbaking.com/go-jamming/rest" "strings" ) diff --git a/app/pingback/send/send_test.go b/app/pingback/send/send_test.go index 6f59313..89f2a1d 100644 --- a/app/pingback/send/send_test.go +++ b/app/pingback/send/send_test.go @@ -2,8 +2,8 @@ package send import ( "github.com/stretchr/testify/assert" - "github.com/wgroeneveld/go-jamming/app/mf" - "github.com/wgroeneveld/go-jamming/mocks" + "brainbaking.com/go-jamming/app/mf" + "brainbaking.com/go-jamming/mocks" "testing" ) diff --git a/app/pingback/validate.go b/app/pingback/validate.go index a1f3aa1..aa350ca 100644 --- a/app/pingback/validate.go +++ b/app/pingback/validate.go @@ -1,7 +1,7 @@ package pingback import ( - "github.com/wgroeneveld/go-jamming/common" + "brainbaking.com/go-jamming/common" "strings" ) diff --git a/app/pingback/validate_test.go b/app/pingback/validate_test.go index 945b0e4..1ea977a 100644 --- a/app/pingback/validate_test.go +++ b/app/pingback/validate_test.go @@ -3,7 +3,7 @@ package pingback import ( "encoding/xml" "github.com/stretchr/testify/assert" - "github.com/wgroeneveld/go-jamming/common" + "brainbaking.com/go-jamming/common" "testing" ) diff --git a/app/routes.go b/app/routes.go index a557214..220338a 100644 --- a/app/routes.go +++ b/app/routes.go @@ -2,9 +2,9 @@ package app import ( - "github.com/wgroeneveld/go-jamming/app/index" - "github.com/wgroeneveld/go-jamming/app/pingback" - "github.com/wgroeneveld/go-jamming/app/webmention" + "brainbaking.com/go-jamming/app/index" + "brainbaking.com/go-jamming/app/pingback" + "brainbaking.com/go-jamming/app/webmention" ) // stole ideas from https://pace.dev/blog/2018/05/09/how-I-write-http-services-after-eight-years.html diff --git a/app/server.go b/app/server.go index 8a729fa..1a9983a 100644 --- a/app/server.go +++ b/app/server.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "github.com/wgroeneveld/go-jamming/common" + "brainbaking.com/go-jamming/common" "github.com/gorilla/mux" "github.com/rs/zerolog/log" diff --git a/app/server_test.go b/app/server_test.go index 8d6e568..afb2c66 100644 --- a/app/server_test.go +++ b/app/server_test.go @@ -3,7 +3,7 @@ package app import ( "github.com/gorilla/mux" "github.com/stretchr/testify/assert" - "github.com/wgroeneveld/go-jamming/common" + "brainbaking.com/go-jamming/common" "net/http" "net/http/httptest" "testing" diff --git a/app/webmention/handler.go b/app/webmention/handler.go index 3114d7d..7a3d93e 100644 --- a/app/webmention/handler.go +++ b/app/webmention/handler.go @@ -4,13 +4,13 @@ package webmention import ( "fmt" "github.com/gorilla/mux" - "github.com/wgroeneveld/go-jamming/app/mf" - "github.com/wgroeneveld/go-jamming/app/webmention/receive" - "github.com/wgroeneveld/go-jamming/app/webmention/send" + "brainbaking.com/go-jamming/app/mf" + "brainbaking.com/go-jamming/app/webmention/recv" + "brainbaking.com/go-jamming/app/webmention/send" "net/http" - "github.com/wgroeneveld/go-jamming/common" - "github.com/wgroeneveld/go-jamming/rest" + "brainbaking.com/go-jamming/common" + "brainbaking.com/go-jamming/rest" ) var httpClient = &rest.HttpClient{} @@ -26,7 +26,7 @@ func HandlePut(conf *common.Config) http.HandlerFunc { since := getSinceQueryParam(r) domain := mux.Vars(r)["domain"] - snder := send.Sender{ + snder := &send.Sender{ RestClient: httpClient, Conf: conf, } @@ -62,7 +62,7 @@ func HandlePost(conf *common.Config) http.HandlerFunc { Source: r.FormValue("source"), Target: target, } - recv := &receive.Receiver{ + recv := &recv.Receiver{ RestClient: httpClient, Conf: conf, } diff --git a/app/webmention/receive/receive.go b/app/webmention/recv/receive.go similarity index 95% rename from app/webmention/receive/receive.go rename to app/webmention/recv/receive.go index 5ceea46..6b2914c 100644 --- a/app/webmention/receive/receive.go +++ b/app/webmention/recv/receive.go @@ -1,11 +1,11 @@ -package receive +package recv import ( "encoding/json" - "github.com/wgroeneveld/go-jamming/app/mf" - "github.com/wgroeneveld/go-jamming/common" - "github.com/wgroeneveld/go-jamming/rest" + "brainbaking.com/go-jamming/app/mf" + "brainbaking.com/go-jamming/common" + "brainbaking.com/go-jamming/rest" "io/fs" "io/ioutil" "os" diff --git a/app/webmention/receive/receive_test.go b/app/webmention/recv/receive_test.go similarity index 98% rename from app/webmention/receive/receive_test.go rename to app/webmention/recv/receive_test.go index 9461a04..d30e4b3 100644 --- a/app/webmention/receive/receive_test.go +++ b/app/webmention/recv/receive_test.go @@ -1,17 +1,17 @@ -package receive +package recv import ( "errors" "github.com/stretchr/testify/assert" - "github.com/wgroeneveld/go-jamming/app/mf" + "brainbaking.com/go-jamming/app/mf" "io/ioutil" "os" "testing" "time" - "github.com/wgroeneveld/go-jamming/common" - "github.com/wgroeneveld/go-jamming/mocks" + "brainbaking.com/go-jamming/common" + "brainbaking.com/go-jamming/mocks" ) var conf = &common.Config{ diff --git a/app/webmention/send/send.go b/app/webmention/send/send.go index 7aecc37..c383c73 100644 --- a/app/webmention/send/send.go +++ b/app/webmention/send/send.go @@ -2,10 +2,10 @@ package send import ( "github.com/rs/zerolog/log" - "github.com/wgroeneveld/go-jamming/app/mf" - "github.com/wgroeneveld/go-jamming/app/pingback/send" - "github.com/wgroeneveld/go-jamming/common" - "github.com/wgroeneveld/go-jamming/rest" + "brainbaking.com/go-jamming/app/mf" + "brainbaking.com/go-jamming/app/pingback/send" + "brainbaking.com/go-jamming/common" + "brainbaking.com/go-jamming/rest" ) type Sender struct { diff --git a/app/webmention/validate.go b/app/webmention/validate.go index 19802e9..63be91c 100644 --- a/app/webmention/validate.go +++ b/app/webmention/validate.go @@ -4,8 +4,8 @@ package webmention import ( "strings" - "github.com/wgroeneveld/go-jamming/common" - "github.com/wgroeneveld/go-jamming/rest" + "brainbaking.com/go-jamming/common" + "brainbaking.com/go-jamming/rest" "github.com/rs/zerolog/log" ) diff --git a/app/webmention/validate_test.go b/app/webmention/validate_test.go index 026cd5c..6f4bd5b 100644 --- a/app/webmention/validate_test.go +++ b/app/webmention/validate_test.go @@ -6,8 +6,8 @@ import ( "errors" "net/http" - "github.com/wgroeneveld/go-jamming/common" - "github.com/wgroeneveld/go-jamming/mocks" + "brainbaking.com/go-jamming/common" + "brainbaking.com/go-jamming/mocks" ) type httpReqMock struct { diff --git a/go.mod b/go.mod index 8acbdaf..3a25a60 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/wgroeneveld/go-jamming +module brainbaking.com/go-jamming go 1.16 diff --git a/main.go b/main.go index 89aed1c..5bfbbc8 100644 --- a/main.go +++ b/main.go @@ -4,7 +4,7 @@ package main import ( "os" - "github.com/wgroeneveld/go-jamming/app" + "brainbaking.com/go-jamming/app" "github.com/rs/zerolog" "github.com/rs/zerolog/log"