re-format go files
36 files changed, 96 insertions(+), 78 deletions(-)
changed files
- .golangci.yaml
- domain/analytics/goatcounter/count.go
- domain/content/builder/build/main.go
- domain/content/builder/builder.go
- domain/content/builder/template/template.go
- domain/content/fetcher/fetcher.go
- domain/content/posts.go
- domain/content/publisher/app.go
- domain/content/publisher/barkeep/main.go
- domain/content/publisher/mux.go
- domain/content/publisher/templates/index.go
- domain/content/publisher/templates/layout.go
- domain/content/templates/homepage.go
- domain/content/templates/list.go
- domain/content/templates/page.go
- domain/content/templates/post.go
- domain/identity/oidc/service.go
- domain/identity/service.go
- domain/identity/webfinger/service.go
- domain/indieweb/atom/atom.go
- domain/indieweb/sitemap/sitemap.go
- domain/vanity/templates/gopkg.go
- domain/web/mux.go
- domain/web/server/logging.go
- domain/web/server/server.go
- domain/web/templates/error.go
- domain/web/templates/layout.go
- domain/web/website.go
- main.go
- shared/config/config.go
- shared/events/file.go
- shared/storage/file.go
- shared/storage/files/file.go
- shared/storage/files/reader.go
- shared/storage/files/writer.go
- shared/vcs/repository.go
M .golangci.yaml → .golangci.yaml
@@ -40,3 +40,14 @@ presets: - comments - std-error-handling - common-false-positives +formatters: + enable: + - gci + - golines + settings: + gci: + custom-order: true + sections: + - standard + - default + - localmodule
M domain/analytics/goatcounter/count.go → domain/analytics/goatcounter/count.go
@@ -8,10 +8,11 @@ "io" "net/http" "time" - "alin.ovh/homestead/shared/config" "alin.ovh/x/log" "github.com/Southclaws/fault" "github.com/Southclaws/fault/fmsg" + + "alin.ovh/homestead/shared/config" ) type Options struct {
M domain/content/builder/build/main.go → domain/content/builder/build/main.go
@@ -5,13 +5,13 @@ "errors" "fmt" "os" + "alin.ovh/x/log" + "github.com/ardanlabs/conf/v3" + "alin.ovh/homestead/domain/content/builder" "alin.ovh/homestead/shared/config" "alin.ovh/homestead/shared/storage/files" "alin.ovh/homestead/shared/vcs" - "alin.ovh/x/log" - - "github.com/ardanlabs/conf/v3" ) type Options struct {
M domain/content/builder/builder.go → domain/content/builder/builder.go
@@ -9,6 +9,11 @@ "path/filepath" "slices" "time" + "alin.ovh/x/log" + "github.com/Southclaws/fault" + "github.com/Southclaws/fault/fmsg" + mapset "github.com/deckarep/golang-set/v2" + "alin.ovh/homestead/domain/content" "alin.ovh/homestead/domain/content/builder/template" ctemplates "alin.ovh/homestead/domain/content/templates"@@ -19,11 +24,6 @@ "alin.ovh/homestead/shared/buffer" "alin.ovh/homestead/shared/config" "alin.ovh/homestead/shared/storage" "alin.ovh/homestead/shared/vcs" - "alin.ovh/x/log" - - "github.com/Southclaws/fault" - "github.com/Southclaws/fault/fmsg" - mapset "github.com/deckarep/golang-set/v2" ) type Options struct {
M domain/content/builder/template/template.go → domain/content/builder/template/template.go
@@ -6,16 +6,16 @@ "encoding/xml" "io" "text/template" - "alin.ovh/homestead/domain/content" - "alin.ovh/homestead/domain/indieweb/atom" - "alin.ovh/homestead/domain/web/templates" - "alin.ovh/homestead/shared/config" - "github.com/PuerkitoBio/goquery" "github.com/Southclaws/fault" "github.com/Southclaws/fault/fmsg" "github.com/antchfx/xmlquery" "github.com/antchfx/xpath" + + "alin.ovh/homestead/domain/content" + "alin.ovh/homestead/domain/indieweb/atom" + "alin.ovh/homestead/domain/web/templates" + "alin.ovh/homestead/shared/config" ) var nsMap = map[string]string{
M domain/content/fetcher/fetcher.go → domain/content/fetcher/fetcher.go
@@ -14,12 +14,13 @@ "strconv" "strings" "time" - "alin.ovh/homestead/shared/config" - "alin.ovh/homestead/shared/events" "alin.ovh/x/log" "github.com/Southclaws/fault" "github.com/Southclaws/fault/fmsg" "github.com/google/renameio/v2" + + "alin.ovh/homestead/shared/config" + "alin.ovh/homestead/shared/events" ) type Fetcher struct {
M domain/content/posts.go → domain/content/posts.go
@@ -12,14 +12,14 @@ "slices" "strings" "time" - "alin.ovh/homestead/domain/content/markdown" - "alin.ovh/homestead/shared/vcs" "alin.ovh/x/log" - "github.com/Southclaws/fault" "github.com/Southclaws/fault/fmsg" "github.com/adrg/frontmatter" mapset "github.com/deckarep/golang-set/v2" + + "alin.ovh/homestead/domain/content/markdown" + "alin.ovh/homestead/shared/vcs" ) type PostMatter struct {
M domain/content/publisher/app.go → domain/content/publisher/app.go
@@ -3,6 +3,7 @@ import ( "net/http" + "alin.ovh/x/log" "github.com/Southclaws/fault" "github.com/Southclaws/fault/fmsg" "go.hacdias.com/indielib/indieauth"@@ -12,7 +13,6 @@ "alin.ovh/homestead/domain/web/server" "alin.ovh/homestead/domain/web/templates" "alin.ovh/homestead/shared/config" ihttp "alin.ovh/homestead/shared/http" - "alin.ovh/x/log" ) type Options struct {
M domain/content/publisher/barkeep/main.go → domain/content/publisher/barkeep/main.go
@@ -7,13 +7,13 @@ "fmt" "os" "path/filepath" + "alin.ovh/x/log" "github.com/ardanlabs/conf/v3" "tailscale.com/tsnet" "alin.ovh/homestead/domain/content/publisher" "alin.ovh/homestead/domain/web/server" "alin.ovh/homestead/shared/env" - "alin.ovh/x/log" ) type Options struct {
M domain/content/publisher/mux.go → domain/content/publisher/mux.go
@@ -4,10 +4,11 @@ import ( "context" "net/http" + "tailscale.com/tailcfg" + "alin.ovh/homestead/domain/content/publisher/templates" basetpl "alin.ovh/homestead/domain/web/templates" ihttp "alin.ovh/homestead/shared/http" - "tailscale.com/tailcfg" ) type user struct{}
M domain/content/publisher/templates/index.go → domain/content/publisher/templates/index.go
@@ -3,6 +3,7 @@ import ( g "alin.ovh/gomponents" . "alin.ovh/gomponents/html" + base "alin.ovh/homestead/domain/web/templates" )
M domain/content/publisher/templates/layout.go → domain/content/publisher/templates/layout.go
@@ -1,11 +1,11 @@ package templates import ( - base "alin.ovh/homestead/domain/web/templates" - g "alin.ovh/gomponents" c "alin.ovh/gomponents/components" . "alin.ovh/gomponents/html" + + base "alin.ovh/homestead/domain/web/templates" ) func Layout(site base.SiteSettings, page base.PageSettings, children ...g.Node) g.Node {
M domain/content/templates/homepage.go → domain/content/templates/homepage.go
@@ -1,12 +1,12 @@ package templates import ( + g "alin.ovh/gomponents" + . "alin.ovh/gomponents/html" + "alin.ovh/homestead/domain/content" "alin.ovh/homestead/domain/web/templates" "alin.ovh/homestead/shared/config" - - g "alin.ovh/gomponents" - . "alin.ovh/gomponents/html" ) type HomepageVars struct {
M domain/content/templates/list.go → domain/content/templates/list.go
@@ -1,11 +1,11 @@ package templates import ( - "alin.ovh/homestead/domain/content" - "alin.ovh/homestead/domain/web/templates" - g "alin.ovh/gomponents" . "alin.ovh/gomponents/html" + + "alin.ovh/homestead/domain/content" + "alin.ovh/homestead/domain/web/templates" ) type TagPageVars struct {
M domain/content/templates/page.go → domain/content/templates/page.go
@@ -1,11 +1,11 @@ package templates import ( - "alin.ovh/homestead/domain/content" - "alin.ovh/homestead/domain/web/templates" - g "alin.ovh/gomponents" . "alin.ovh/gomponents/html" + + "alin.ovh/homestead/domain/content" + "alin.ovh/homestead/domain/web/templates" ) func Page(site templates.SiteSettings, page *content.Post) g.Node {
M domain/content/templates/post.go → domain/content/templates/post.go
@@ -3,12 +3,12 @@ import ( "time" + g "alin.ovh/gomponents" + . "alin.ovh/gomponents/html" + "alin.ovh/homestead/domain/content" "alin.ovh/homestead/domain/web/templates" "alin.ovh/homestead/shared/vcs" - - g "alin.ovh/gomponents" - . "alin.ovh/gomponents/html" ) func PostPage(site templates.SiteSettings, post *content.Post) g.Node {
M domain/identity/oidc/service.go → domain/identity/oidc/service.go
@@ -3,11 +3,11 @@ import ( "net/http" - "alin.ovh/homestead/shared/config" - sharedhttp "alin.ovh/homestead/shared/http" "alin.ovh/x/log" - "github.com/benpate/digit" + + "alin.ovh/homestead/shared/config" + sharedhttp "alin.ovh/homestead/shared/http" ) type Service struct {
M domain/identity/service.go → domain/identity/service.go
@@ -1,11 +1,12 @@ package identity import ( + "alin.ovh/x/log" + "alin.ovh/homestead/domain/identity/oidc" "alin.ovh/homestead/domain/identity/webfinger" "alin.ovh/homestead/shared/config" "alin.ovh/homestead/shared/http" - "alin.ovh/x/log" ) type Service struct {
M domain/identity/webfinger/service.go → domain/identity/webfinger/service.go
@@ -4,10 +4,10 @@ import ( "encoding/json" "net/http" - ihttp "alin.ovh/homestead/shared/http" "alin.ovh/x/log" - "github.com/benpate/digit" + + ihttp "alin.ovh/homestead/shared/http" ) type ResourceProvider interface {
M domain/indieweb/atom/atom.go → domain/indieweb/atom/atom.go
@@ -6,8 +6,9 @@ "encoding/xml" "net/url" "time" + "github.com/Southclaws/fault" + "alin.ovh/homestead/shared/config" - "github.com/Southclaws/fault" ) type Link struct {
M domain/indieweb/sitemap/sitemap.go → domain/indieweb/sitemap/sitemap.go
@@ -4,9 +4,9 @@ import ( "io" "time" - "alin.ovh/homestead/shared/config" - "github.com/snabb/sitemap" + + "alin.ovh/homestead/shared/config" ) type Sitemap struct {
M domain/vanity/templates/gopkg.go → domain/vanity/templates/gopkg.go
@@ -6,6 +6,7 @@ "net/url" g "alin.ovh/gomponents" . "alin.ovh/gomponents/html" + "alin.ovh/homestead/domain/web/templates" "alin.ovh/homestead/shared/config" )
M domain/web/mux.go → domain/web/mux.go
@@ -6,13 +6,13 @@ "regexp" "slices" "strings" + "github.com/kevinpollet/nego" + "alin.ovh/homestead/domain/analytics" calendar "alin.ovh/homestead/domain/calendar/templates" "alin.ovh/homestead/domain/web/server" "alin.ovh/homestead/domain/web/templates" ihttp "alin.ovh/homestead/shared/http" - - "github.com/kevinpollet/nego" ) var (
M domain/web/server/logging.go → domain/web/server/logging.go
@@ -3,9 +3,9 @@ import ( "net/http" - sharedhttp "alin.ovh/homestead/shared/http" - "alin.ovh/x/log" + + sharedhttp "alin.ovh/homestead/shared/http" ) func wrapHandlerWithLogging(wrappedHandler http.Handler, log *log.Logger) http.Handler {
M domain/web/server/server.go → domain/web/server/server.go
@@ -9,10 +9,9 @@ "net/http" "time" "alin.ovh/x/log" - "github.com/osdevisnot/sorvor/pkg/livereload" - "github.com/Southclaws/fault" "github.com/Southclaws/fault/fmsg" + "github.com/osdevisnot/sorvor/pkg/livereload" ) type Options struct {
M domain/web/templates/error.go → domain/web/templates/error.go
@@ -3,6 +3,7 @@ import ( g "alin.ovh/gomponents" . "alin.ovh/gomponents/html" + "alin.ovh/homestead/shared/http" )
M domain/web/templates/layout.go → domain/web/templates/layout.go
@@ -3,12 +3,12 @@ import ( "io" - "alin.ovh/homestead/shared/config" + g "alin.ovh/gomponents" + . "alin.ovh/gomponents/html" "github.com/Southclaws/fault" "github.com/alanpearce/htmlformat" - g "alin.ovh/gomponents" - . "alin.ovh/gomponents/html" + "alin.ovh/homestead/shared/config" ) type SiteSettings struct {
M domain/web/website.go → domain/web/website.go
@@ -7,6 +7,11 @@ "os" "sync" "time" + "alin.ovh/x/log" + "github.com/Southclaws/fault" + "github.com/Southclaws/fault/fmsg" + "github.com/osdevisnot/sorvor/pkg/livereload" + "alin.ovh/homestead/domain/analytics" "alin.ovh/homestead/domain/analytics/goatcounter" "alin.ovh/homestead/domain/analytics/nullcounter"@@ -21,11 +26,6 @@ "alin.ovh/homestead/shared/file" ihttp "alin.ovh/homestead/shared/http" "alin.ovh/homestead/shared/storage" "alin.ovh/homestead/shared/storage/files" - "alin.ovh/x/log" - "github.com/Southclaws/fault" - "github.com/Southclaws/fault/fmsg" - - "github.com/osdevisnot/sorvor/pkg/livereload" ) type Options struct {
M main.go → main.go
@@ -8,12 +8,12 @@ "os" "os/signal" "time" - website "alin.ovh/homestead/domain/web" - "alin.ovh/homestead/domain/web/server" "alin.ovh/x/log" - "github.com/ardanlabs/conf/v3" "github.com/osdevisnot/sorvor/pkg/livereload" + + website "alin.ovh/homestead/domain/web" + "alin.ovh/homestead/domain/web/server" ) type Options struct {