mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-25 06:16:58 +00:00
Add golangci linters
- Remove unnecessary type conversion. - Fix gocritic checks.
This commit is contained in:
parent
df5199c9a3
commit
827c582147
7 changed files with 40 additions and 21 deletions
|
@ -44,7 +44,7 @@ func (p aDB) Get(name string) (*certificate.Resource, error) {
|
|||
if resBytes == nil {
|
||||
return nil, nil
|
||||
}
|
||||
if err = gob.NewDecoder(bytes.NewBuffer(resBytes)).Decode(cert); err != nil {
|
||||
if err := gob.NewDecoder(bytes.NewBuffer(resBytes)).Decode(cert); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return cert, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue