Skip to content

Commit

Permalink
fix: golint
Browse files Browse the repository at this point in the history
  • Loading branch information
Clov614 committed Aug 15, 2024
1 parent 6bf27ce commit 9473ba1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rikkabot/plugins/ai/weather_func2ai.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ func init() {
}
bytes, _ := json.Marshal(wCfgInterface)

Check failure on line 29 in rikkabot/plugins/ai/weather_func2ai.go

View workflow job for this annotation

GitHub Actions / build

Error return value of `encoding/json.Marshal` is not checked: unsafe type `interface{}` found (errchkjson)
var wcfg weatherCfg
json.Unmarshal(bytes, &wcfg)
err := json.Unmarshal(bytes, &wcfg)
if err != nil {
logging.Fatal("weather_ai plugin config unmarshal fail", 12)
}
w := weather.NewWeather(wcfg.Key)
funcCallInfo := ai_sdk.FuncCallInfo{
Function: ai_sdk.Function{
Expand Down

0 comments on commit 9473ba1

Please sign in to comment.