mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-06-07 00:46:58 +03:00
Add golangci-lint CI (#516)
This commit is contained in:
parent
769883f020
commit
b3c22aa81f
14 changed files with 75 additions and 37 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -76,7 +76,6 @@ func (o *JsonDB) SaveWakeOnLanHost(host model.WakeOnLanHost) error {
|
|||
}
|
||||
|
||||
return output
|
||||
|
||||
}
|
||||
|
||||
func (o *JsonDB) DeleteWakeOnHost(host model.WakeOnLanHost) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue