MCPcopy Create free account
hub / github.com/MMadmer/EpicAssetsNotifyBot / asInt64

Function asInt64

internal/model/normalize.go:259–278  ·  view source on GitHub ↗
(value any)

Source from the content-addressed store, hash-verified

257}
258
259func asInt64(value any) (int64, bool) {
260 switch v := value.(type) {
261 case int:
262 return int64(v), true
263 case int8:
264 return int64(v), true
265 case int16:
266 return int64(v), true
267 case int32:
268 return int64(v), true
269 case int64:
270 return v, true
271 case float64:
272 return int64(v), v == float64(int64(v))
273 case float32:
274 return int64(v), v == float32(int64(v))
275 default:
276 return 0, false
277 }
278}
279
280func asInt64Ptr(value any) (*int64, bool) {
281 v, ok := asInt64(value)

Callers 5

NormalizeChannelsMethod · 0.85
NormalizeGuildConfigsMethod · 0.85
NormalizeUserProfilesMethod · 0.85
asInt64PtrFunction · 0.85
deadlineFromMapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected