style: re-organise all imports with goimports
18 files changed, 40 insertions(+), 26 deletions(-)
changed files
- internal/components/search.go
- internal/fetcher/channel.go
- internal/fetcher/download.go
- internal/fetcher/main.go
- internal/index/indexer.go
- internal/index/search.go
- internal/index/search_test.go
- internal/manpages/manpages.go
- internal/nixdocs/filepath/example/main.go
- internal/nixdocs/manpage/example/main.go
- internal/nixdocs/optlink/example/main.go
- internal/nixdocs/variable/example/main.go
- internal/programs/programs.go
- internal/server/dev.go
- internal/server/error.go
- internal/server/mux.go
- internal/server/server.go
- web/searchix.go
M internal/components/search.go → internal/components/search.go
@@ -6,9 +6,10 @@ "time" g "alin.ovh/gomponents" . "alin.ovh/gomponents/html" + "github.com/dustin/go-humanize" + "alin.ovh/searchix/internal/config" "alin.ovh/searchix/internal/importer" - "github.com/dustin/go-humanize" ) func SearchForm(tdata TemplateData, r ResultData) g.Node {
M internal/fetcher/channel.go → internal/fetcher/channel.go
@@ -9,10 +9,11 @@ "strconv" "strings" "time" + "github.com/Southclaws/fault" + "github.com/Southclaws/fault/fmsg" + "alin.ovh/searchix/internal/config" "alin.ovh/searchix/internal/index" - "github.com/Southclaws/fault" - "github.com/Southclaws/fault/fmsg" ) type ChannelFetcher struct {
M internal/fetcher/download.go → internal/fetcher/download.go
@@ -4,11 +4,12 @@ import ( "context" "net/url" + "github.com/Southclaws/fault" + "github.com/Southclaws/fault/fmsg" + "alin.ovh/searchix/internal/config" "alin.ovh/searchix/internal/fetcher/http" "alin.ovh/searchix/internal/index" - "github.com/Southclaws/fault" - "github.com/Southclaws/fault/fmsg" ) type DownloadFetcher struct {
M internal/fetcher/main.go → internal/fetcher/main.go
@@ -5,12 +5,13 @@ "context" "io" "os" + "alin.ovh/x/log" + "github.com/Southclaws/fault" + "github.com/Southclaws/fault/fmsg" + "alin.ovh/searchix/internal/config" "alin.ovh/searchix/internal/file" "alin.ovh/searchix/internal/index" - "alin.ovh/x/log" - "github.com/Southclaws/fault" - "github.com/Southclaws/fault/fmsg" ) type Options struct {
M internal/index/indexer.go → internal/index/indexer.go
@@ -9,9 +9,8 @@ "alin.ovh/searchix/internal/file" "alin.ovh/searchix/internal/index/nixattr" "alin.ovh/searchix/internal/nix" "alin.ovh/searchix/internal/storage" + "alin.ovh/x/log" - "go.uber.org/zap" - "github.com/Southclaws/fault" "github.com/Southclaws/fault/fmsg" "github.com/blevesearch/bleve/v2"@@ -25,6 +24,7 @@ "github.com/blevesearch/bleve/v2/analysis/token/porter" "github.com/blevesearch/bleve/v2/analysis/tokenizer/letter" "github.com/blevesearch/bleve/v2/analysis/tokenizer/unicode" "github.com/blevesearch/bleve/v2/mapping" + "go.uber.org/zap" ) type Options struct {
M internal/index/search.go → internal/index/search.go
@@ -6,10 +6,11 @@ "iter" "strings" "time" + "alin.ovh/x/log" + "alin.ovh/searchix/internal/config" "alin.ovh/searchix/internal/nix" "alin.ovh/searchix/internal/storage" - "alin.ovh/x/log" "github.com/Southclaws/fault" "github.com/Southclaws/fault/fmsg"
M internal/index/search_test.go → internal/index/search_test.go
@@ -8,12 +8,13 @@ "slices" "testing" "time" + "alin.ovh/x/log" + "alin.ovh/searchix/internal/config" "alin.ovh/searchix/internal/file" "alin.ovh/searchix/internal/index" "alin.ovh/searchix/internal/nix" "alin.ovh/searchix/internal/storage" - "alin.ovh/x/log" ) const rootPath = "../../data"
M internal/manpages/manpages.go → internal/manpages/manpages.go
@@ -6,12 +6,13 @@ "encoding/json" "fmt" "time" + "alin.ovh/x/log" + "github.com/Southclaws/fault" + "github.com/Southclaws/fault/fmsg" + "alin.ovh/searchix/internal/config" "alin.ovh/searchix/internal/fetcher/http" "alin.ovh/searchix/internal/file" - "alin.ovh/x/log" - "github.com/Southclaws/fault" - "github.com/Southclaws/fault/fmsg" ) const basename = "manpage-urls.json"
M internal/nixdocs/filepath/example/main.go → internal/nixdocs/filepath/example/main.go
@@ -5,8 +5,9 @@ "bytes" "fmt" "os" + "github.com/yuin/goldmark" + "alin.ovh/searchix/internal/nixdocs/filepath" - "github.com/yuin/goldmark" ) func main() {
M internal/nixdocs/manpage/example/main.go → internal/nixdocs/manpage/example/main.go
@@ -5,8 +5,9 @@ "bytes" "fmt" "os" + "github.com/yuin/goldmark" + "alin.ovh/searchix/internal/nixdocs/manpage" - "github.com/yuin/goldmark" ) func main() {
M internal/nixdocs/optlink/example/main.go → internal/nixdocs/optlink/example/main.go
@@ -5,8 +5,9 @@ "bytes" "fmt" "os" + "github.com/yuin/goldmark" + "alin.ovh/searchix/internal/nixdocs/optlink" - "github.com/yuin/goldmark" ) func main() {
M internal/nixdocs/variable/example/main.go → internal/nixdocs/variable/example/main.go
@@ -5,8 +5,9 @@ "bytes" "fmt" "os" + "github.com/yuin/goldmark" + "alin.ovh/searchix/internal/nixdocs/variable" - "github.com/yuin/goldmark" ) func main() {
M internal/programs/programs.go → internal/programs/programs.go
@@ -7,12 +7,13 @@ "fmt" "os/exec" "strings" - "alin.ovh/searchix/internal/config" - "alin.ovh/searchix/internal/file" "alin.ovh/x/log" "github.com/Southclaws/fault" "github.com/Southclaws/fault/fmsg" _ "modernc.org/sqlite" //nolint:revive // sqlite driver needed for database/sql + + "alin.ovh/searchix/internal/config" + "alin.ovh/searchix/internal/file" ) type DB struct {
M internal/server/dev.go → internal/server/dev.go
@@ -5,11 +5,12 @@ "fmt" "io/fs" "time" - "alin.ovh/searchix/internal/file" "alin.ovh/x/log" "github.com/Southclaws/fault" "github.com/Southclaws/fault/fmsg" "github.com/fsnotify/fsnotify" + + "alin.ovh/searchix/internal/file" ) type FileWatcher struct {
M internal/server/error.go → internal/server/error.go
@@ -3,10 +3,11 @@ import ( "net/http" + "alin.ovh/x/log" + "alin.ovh/searchix/frontend" "alin.ovh/searchix/internal/components" "alin.ovh/searchix/internal/config" - "alin.ovh/x/log" ) func createErrorHandler(
M internal/server/mux.go → internal/server/mux.go
@@ -22,8 +22,8 @@ search "alin.ovh/searchix/internal/index" "alin.ovh/searchix/internal/opensearch" "alin.ovh/searchix/internal/pagination" "alin.ovh/searchix/internal/sentryhttp" - "alin.ovh/x/log" + "alin.ovh/x/log" "github.com/Southclaws/fault" "github.com/Southclaws/fault/fmsg" "github.com/osdevisnot/sorvor/pkg/livereload"
M internal/server/server.go → internal/server/server.go
@@ -11,8 +11,8 @@ "alin.ovh/searchix/internal/config" "alin.ovh/searchix/internal/index" "alin.ovh/searchix/internal/manpages" "alin.ovh/searchix/internal/storage" - "alin.ovh/x/log" + "alin.ovh/x/log" "github.com/Southclaws/fault" "github.com/Southclaws/fault/fmsg" "golang.org/x/net/http2"
M web/searchix.go → web/searchix.go
@@ -6,8 +6,8 @@ "time" "alin.ovh/searchix/internal/config" "alin.ovh/searchix/internal/server" - "alin.ovh/x/log" + "alin.ovh/x/log" "github.com/Southclaws/fault" "github.com/Southclaws/fault/fmsg" "github.com/getsentry/sentry-go"