Move formatting to gofumpt (from gofmt)

This commit is contained in:
2025-05-04 00:43:01 +02:00
parent d8092fc9d5
commit e4923b500a
3 changed files with 7 additions and 4 deletions

View File

@ -19,7 +19,7 @@ test:
go test ./...
validate:
@test -z "$(shell gofmt -l .)" || (echo "Incorrect formatting in:"; gofmt -l .; exit 1)
@test -z "$(shell gofumpt -l .)" && echo "No files need formatting" || (echo "Incorrect formatting in:"; gofumpt -l .; exit 1)
go vet ./...
clean:

View File

@ -1,7 +1,10 @@
package main
import "fmt"
import "git.omicron.one/omicron/linkshare/internal/util"
import (
"fmt"
"git.omicron.one/omicron/linkshare/internal/util"
)
func main() {
paths, err := util.FindDirectories("")

View File

@ -110,7 +110,7 @@ func FindDirectories(dbPath string) (*AppPaths, error) {
// CreateDirectories ensures all application managed directories are created
func CreateDirectories(paths *AppPaths) error {
err := os.MkdirAll(filepath.Dir(paths.DatabaseFile), 0750)
err := os.MkdirAll(filepath.Dir(paths.DatabaseFile), 0o750)
if err != nil {
return err
}