Move formatting to gofumpt (from gofmt)
This commit is contained in:
2
Makefile
2
Makefile
@ -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:
|
||||
|
@ -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("")
|
||||
|
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user