feat: local cache

This commit is contained in:
withchao
2024-01-12 17:51:01 +08:00
parent 9908e2c658
commit a81bc3fc23
22 changed files with 245 additions and 316 deletions
+20
View File
@@ -0,0 +1,20 @@
package option
func NewOption() *Option {
return &Option{}
}
type Option struct {
Link []string
}
func (o *Option) WithLink(key ...string) *Option {
if len(key) > 0 {
if len(o.Link) == 0 {
o.Link = key
} else {
o.Link = append(o.Link, key...)
}
}
return o
}