From f5c63cde56eb35c0125a0545f084441cdd4340ab Mon Sep 17 00:00:00 2001 From: Keuin Date: Tue, 11 Jul 2023 22:56:07 +0800 Subject: Refactor: move data structures to a separate package to avoid circular dependency. --- types/types.go | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 types/types.go (limited to 'types/types.go') diff --git a/types/types.go b/types/types.go new file mode 100644 index 0000000..d1b1b70 --- /dev/null +++ b/types/types.go @@ -0,0 +1,9 @@ +// Package types include common data structures used in multiple packages. +package types + +type BaseResponse[T any] struct { + Code int `json:"code"` + Message string `json:"message"` + TTL int `json:"ttl"` + Data T `json:"data"` +} -- cgit v1.2.3