From e9bd72306e8ad1c7d17a5f1bd39bb6cb86d3ab19 Mon Sep 17 00:00:00 2001 From: r Date: Wed, 1 Jan 2020 15:58:27 +0000 Subject: [PATCH] Rename package to bloat --- .gitignore | 2 +- Makefile | 10 +++++----- README | 4 ++-- config/config.go | 3 ++- go.mod | 2 +- main.go | 12 ++++++------ model/notification.go | 1 - model/status.go | 1 - renderer/model.go | 6 +++--- repository/appRepository.go | 5 +++-- repository/sessionRepository.go | 5 +++-- service/auth.go | 5 +++-- service/logging.go | 3 ++- service/service.go | 8 ++++---- service/transport.go | 3 ++- templates/about.tmpl | 2 +- 16 files changed, 38 insertions(+), 34 deletions(-) delete mode 100644 model/notification.go delete mode 100644 model/status.go diff --git a/.gitignore b/.gitignore index 9608799..516f77b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -web +bloat database diff --git a/Makefile b/Makefile index afe663e..8dcbd46 100644 --- a/Makefile +++ b/Makefile @@ -2,12 +2,12 @@ GO=go -all: web +all: bloat PHONY: -web: main.go PHONY - $(GO) build $(GOFLAGS) -o web main.go +bloat: main.go PHONY + $(GO) build $(GOFLAGS) -o bloat main.go -run: web - ./web +run: bloat + ./bloat diff --git a/README b/README index d0e11dd..57bd0e0 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -Web - A web client for Mastodon Network[1] +bloat - A web client for Mastodon Network[1] Features: @@ -28,7 +28,7 @@ Edit the provided config file. See the default.conf file for more details. $ ed default.conf Run the binary -$ ./web +$ ./bloat You can now access the frontend at http://localhost:8080, which is the default listen address. You can also setup a reverse HTTP proxy to serve the frontend over diff --git a/config/config.go b/config/config.go index c463c91..ef07260 100644 --- a/config/config.go +++ b/config/config.go @@ -6,7 +6,8 @@ import ( "io" "os" "strings" - "web/model" + + "bloat/model" ) type config struct { diff --git a/go.mod b/go.mod index 0bebfe1..268e515 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module web +module bloat go 1.13 diff --git a/main.go b/main.go index 423d06a..4f5851d 100644 --- a/main.go +++ b/main.go @@ -9,12 +9,12 @@ import ( "strings" "time" - "web/config" - "web/kv" - "web/renderer" - "web/repository" - "web/service" - "web/util" + "bloat/config" + "bloat/kv" + "bloat/renderer" + "bloat/repository" + "bloat/service" + "bloat/util" ) var ( diff --git a/model/notification.go b/model/notification.go deleted file mode 100644 index 8b53790..0000000 --- a/model/notification.go +++ /dev/null @@ -1 +0,0 @@ -package model diff --git a/model/status.go b/model/status.go deleted file mode 100644 index 8b53790..0000000 --- a/model/status.go +++ /dev/null @@ -1 +0,0 @@ -package model diff --git a/renderer/model.go b/renderer/model.go index 3d344b4..f086e1d 100644 --- a/renderer/model.go +++ b/renderer/model.go @@ -1,8 +1,8 @@ package renderer import ( + "bloat/model" "mastodon" - "web/model" ) type HeaderData struct { @@ -92,14 +92,14 @@ type RetweetedByData struct { type FollowingData struct { *CommonData - Users []*mastodon.Account + Users []*mastodon.Account HasNext bool NextLink string } type FollowersData struct { *CommonData - Users []*mastodon.Account + Users []*mastodon.Account HasNext bool NextLink string } diff --git a/repository/appRepository.go b/repository/appRepository.go index cfa7950..9e57fb7 100644 --- a/repository/appRepository.go +++ b/repository/appRepository.go @@ -2,8 +2,9 @@ package repository import ( "encoding/json" - "web/kv" - "web/model" + + "bloat/kv" + "bloat/model" ) type appRepository struct { diff --git a/repository/sessionRepository.go b/repository/sessionRepository.go index d5f399a..cb19f68 100644 --- a/repository/sessionRepository.go +++ b/repository/sessionRepository.go @@ -2,8 +2,9 @@ package repository import ( "encoding/json" - "web/kv" - "web/model" + + "bloat/kv" + "bloat/model" ) type sessionRepository struct { diff --git a/service/auth.go b/service/auth.go index efc8dd3..2aa71d9 100644 --- a/service/auth.go +++ b/service/auth.go @@ -4,9 +4,10 @@ import ( "context" "errors" "io" - "mastodon" "mime/multipart" - "web/model" + + "bloat/model" + "mastodon" ) var ( diff --git a/service/logging.go b/service/logging.go index d1685ac..7d53f89 100644 --- a/service/logging.go +++ b/service/logging.go @@ -6,7 +6,8 @@ import ( "log" "mime/multipart" "time" - "web/model" + + "bloat/model" ) type loggingService struct { diff --git a/service/service.go b/service/service.go index 27e0d4a..f8a4aed 100644 --- a/service/service.go +++ b/service/service.go @@ -12,10 +12,10 @@ import ( "net/url" "strings" + "bloat/model" + "bloat/renderer" + "bloat/util" "mastodon" - "web/model" - "web/renderer" - "web/util" ) var ( @@ -93,7 +93,7 @@ func (svc *service) GetAuthUrl(ctx context.Context, instance string) ( session := model.Session{ ID: sessionID, InstanceDomain: instance, - Settings: *model.NewSettings(), + Settings: *model.NewSettings(), } err = svc.sessionRepo.Add(session) if err != nil { diff --git a/service/transport.go b/service/transport.go index 8075377..dc7e479 100644 --- a/service/transport.go +++ b/service/transport.go @@ -7,7 +7,8 @@ import ( "path" "strconv" "time" - "web/model" + + "bloat/model" "github.com/gorilla/mux" ) diff --git a/templates/about.tmpl b/templates/about.tmpl index 6038501..60bb5f6 100644 --- a/templates/about.tmpl +++ b/templates/about.tmpl @@ -10,7 +10,7 @@ The source code is released under CC0 and is available on - git.freesoftwareextremist.com/web. + git.freesoftwareextremist.com/bloat.