cast
safe and easy casting from one type to another in Go
Cast is a Go library that provides easy and safe conversion (casting) between different types in Go programs. Especially when dealing with interface{} or dynamic/reflect-heavy code, it becomes cumbersome to assert types or convert values reliably; cast addresses that by offering a suite of functions to convert from any input to the target type with predictable behaviour. Rather than relying purely on raw type assertions, it offers ToInt, ToString, ToBool, ToTime, etc., and their...