code cleanup
This commit is contained in:
parent
917be1687f
commit
5336968e05
34 changed files with 193 additions and 115 deletions
|
@ -6,6 +6,8 @@ import (
|
|||
|
||||
"govd/enums"
|
||||
"govd/models"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func FindBestPhoto(
|
||||
|
@ -25,7 +27,7 @@ func FindBestPhoto(
|
|||
}
|
||||
|
||||
if bestPhoto == nil {
|
||||
return nil, fmt.Errorf("no photo found in post")
|
||||
return nil, errors.New("no photo found in post")
|
||||
}
|
||||
|
||||
return bestPhoto, nil
|
||||
|
@ -47,7 +49,7 @@ func ParseVideoFormats(
|
|||
}
|
||||
}
|
||||
if video == nil {
|
||||
return nil, fmt.Errorf("no video found in post")
|
||||
return nil, errors.New("no video found in post")
|
||||
}
|
||||
|
||||
codecMapping := map[string]struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue