Add golangci-lint CI

This commit is contained in:
Khanh Ngo 2023-12-31 21:34:57 +01:00
parent 769883f020
commit 020e0fdc67
No known key found for this signature in database
GPG key ID: 29077342AA5648F6
12 changed files with 69 additions and 36 deletions

View file

@ -33,7 +33,6 @@ func New(dbPath string) (*JsonDB, error) {
dbPath: dbPath,
}
return &ans, nil
}
func (o *JsonDB) Init() error {
@ -77,7 +76,6 @@ func (o *JsonDB) Init() error {
// server's key pair
if _, err := os.Stat(serverKeyPairPath); os.IsNotExist(err) {
key, err := wgtypes.GeneratePrivateKey()
if err != nil {
return scribble.ErrMissingCollection
@ -193,7 +191,6 @@ func (o *JsonDB) GetUsers() ([]model.User, error) {
return users, fmt.Errorf("cannot decode user json structure: %v", err)
}
users = append(users, user)
}
return users, err
}

View file

@ -76,7 +76,6 @@ func (o *JsonDB) SaveWakeOnLanHost(host model.WakeOnLanHost) error {
}
return output
}
func (o *JsonDB) DeleteWakeOnHost(host model.WakeOnLanHost) error {