Skip to content

Commit

Permalink
Refactor cache.go to handle string conversion for data assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Walkmana-25 committed Oct 6, 2024
1 parent 2bd3aca commit db16a5c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ func CreateCache(redisClient *redis.Client, anemosData []interface{}) error {
var object_type EventType = EventType(dataMap["object_type"].(string))

// objectidをキーにして、データを保存する
target_data[object_id] = data.(string)
// convert data to string
stringData := fmt.Sprintf("%v", data)
target_data[object_id] = stringData

// イベントタイプをキーにして、objectidを保存する
if _, exists := weekly_data[object_type]; !exists {
Expand Down

0 comments on commit db16a5c

Please sign in to comment.