1 Star 0 Fork 1

Uni-Minds/bridge-pacs

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cache.go 771 Bytes
一键复制 编辑 原始数据 按行查看 历史
Liuxy 提交于 2022-10-15 16:48 +08:00 . Release 1.0.9
package tools
import (
"encoding/json"
"fmt"
"gitee.com/uni-minds/bridge-pacs/global"
)
func DecodeCachePathImage(str string) (cache global.CachePathImage) {
if str != "" {
err := json.Unmarshal([]byte(str), &cache)
if err != nil {
fmt.Println("E Decode cache:", str, err.Error())
}
}
return cache
}
func EncodeCachePathImage(cache global.CachePathImage) string {
bs, _ := json.Marshal(cache)
return string(bs)
}
func DecodeCachePathVideo(str string) (cache global.CachePathVideo) {
if str != "" {
err := json.Unmarshal([]byte(str), &cache)
if err != nil {
fmt.Println("E Decode cache:", str, err.Error())
}
}
return cache
}
func EncodeCachePathVideo(cache global.CachePathVideo) string {
bs, _ := json.Marshal(cache)
return string(bs)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/uni-minds/bridge-pacs.git
git@gitee.com:uni-minds/bridge-pacs.git
uni-minds
bridge-pacs
bridge-pacs
v1.0.10

搜索帮助