mirror of
https://github.com/mudler/LocalAI.git
synced 2026-04-28 14:20:31 -05:00
fix: security scanner warning noise: error handlers part 1 (#2141)
first group of error handlers to reduce security scanner warning noise level Signed-off-by: Dave Lee <dave@gray101.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/go-skynet/LocalAI/pkg/downloader"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
"github.com/go-skynet/LocalAI/pkg/assets"
|
||||
"gopkg.in/yaml.v3"
|
||||
@@ -29,7 +30,10 @@ func ModelShortURL(s string) string {
|
||||
}
|
||||
|
||||
func init() {
|
||||
yaml.Unmarshal(modelLibrary, &modelShorteners)
|
||||
err := yaml.Unmarshal(modelLibrary, &modelShorteners)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("error while unmarshalling embedded modelLibrary")
|
||||
}
|
||||
}
|
||||
|
||||
func GetRemoteLibraryShorteners(url string) (map[string]string, error) {
|
||||
|
||||
Reference in New Issue
Block a user