mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-11-08 04:55:15 +00:00
refactor: Replace interface{} with any alias and optimize string formatting with fmt.Appendf
- Replace map[string]interface{} with map[string]any in GraphQL, metrics, payment gateway, and webhook handlers
- Replace []byte(fmt.Sprintf()) with fmt.Appendf(nil, ...) for cursor encoding in GraphQL resolvers and tests
- Replace strings.HasPrefix/TrimPrefix with strings.CutPrefix for webhook signature parsing
- Replace stripe.Int64/Bool with new() constructor for Stripe payment parameters
- Rename Error
This commit is contained in:
@@ -118,7 +118,7 @@ func TestResolverRoot_Methods(t *testing.T) {
|
||||
// Helper functions for testing (these should match the implementations in resolvers.go)
|
||||
|
||||
func encodeCursor(offset int) string {
|
||||
return base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("cursor:%d", offset)))
|
||||
return base64.StdEncoding.EncodeToString(fmt.Appendf(nil, "cursor:%d", offset))
|
||||
}
|
||||
|
||||
func decodeCursor(cursor string) (int, error) {
|
||||
|
||||
Reference in New Issue
Block a user