summaryrefslogtreecommitdiff
path: root/types/types.go
diff options
context:
space:
mode:
authorKeuin <[email protected]>2023-07-11 22:56:07 +0800
committerKeuin <[email protected]>2023-07-11 22:56:07 +0800
commitf5c63cde56eb35c0125a0545f084441cdd4340ab (patch)
treecf24779daaa3067902bef91d21bcdee7a78fd059 /types/types.go
parent7fd817f6d1ead3de85294c1893a6e1572a1d12e3 (diff)
Refactor: move data structures to a separate package to avoid circular dependency.
Diffstat (limited to 'types/types.go')
-rw-r--r--types/types.go9
1 files changed, 9 insertions, 0 deletions
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"`
+}