mirror of
https://codeberg.org/scip/anydb.git
synced 2025-12-16 20:10:59 +01:00
fixed linter warnings
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@ anydb
|
|||||||
*.db
|
*.db
|
||||||
coverage.out
|
coverage.out
|
||||||
*.json
|
*.json
|
||||||
|
releases
|
||||||
|
|||||||
8
Makefile
8
Makefile
@@ -43,12 +43,12 @@ ifdef HAVE_POD
|
|||||||
echo "var manpage = \`" >> cmd/$*.go
|
echo "var manpage = \`" >> cmd/$*.go
|
||||||
pod2text $*.pod >> cmd/$*.go
|
pod2text $*.pod >> cmd/$*.go
|
||||||
echo "\`" >> cmd/$*.go
|
echo "\`" >> cmd/$*.go
|
||||||
|
|
||||||
echo "var usage = \`" >> cmd/$*.go
|
|
||||||
awk '/SYNOPS/{f=1;next} /DESCR/{f=0} f' $*.pod | sed 's/^ //' >> cmd/$*.go
|
|
||||||
echo "\`" >> cmd/$*.go
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# echo "var usage = \`" >> cmd/$*.go
|
||||||
|
# awk '/SYNOPS/{f=1;next} /DESCR/{f=0} f' $*.pod | sed 's/^ //' >> cmd/$*.go
|
||||||
|
# echo "\`" >> cmd/$*.go
|
||||||
|
|
||||||
buildlocal:
|
buildlocal:
|
||||||
go build -ldflags "-X 'github.com/tlinden/anydb/cfg.VERSION=$(VERSION)'"
|
go build -ldflags "-X 'github.com/tlinden/anydb/cfg.VERSION=$(VERSION)'"
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,9 @@ const BucketData string = "data"
|
|||||||
|
|
||||||
func New(file string, debug bool) (*DB, error) {
|
func New(file string, debug bool) (*DB, error) {
|
||||||
if _, err := os.Stat(filepath.Dir(file)); os.IsNotExist(err) {
|
if _, err := os.Stat(filepath.Dir(file)); os.IsNotExist(err) {
|
||||||
os.MkdirAll(filepath.Dir(file), 0700)
|
if err := os.MkdirAll(filepath.Dir(file), 0700); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return &DB{Debug: debug, Dbfile: file}, nil
|
return &DB{Debug: debug, Dbfile: file}, nil
|
||||||
|
|||||||
@@ -27,8 +27,6 @@ func List(writer io.Writer, conf *cfg.Config, entries app.DbEntries) error {
|
|||||||
default:
|
default:
|
||||||
return errors.New("unsupported mode")
|
return errors.New("unsupported mode")
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func ListJson(writer io.Writer, conf *cfg.Config, entries app.DbEntries) error {
|
func ListJson(writer io.Writer, conf *cfg.Config, entries app.DbEntries) error {
|
||||||
|
|||||||
Reference in New Issue
Block a user