Add golangci-lint CI (#516)

This commit is contained in:
Khanh Ngo 2023-12-31 21:46:30 +01:00 committed by GitHub
parent 769883f020
commit b3c22aa81f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 75 additions and 37 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 {