2024-11-16 02:38:34 +08:00

22 lines
564 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package oss
import "catface/app/global/variable"
const qiNiuBucket = "sakura-fox-asia"
const qiNiuDomain = "https://images.cengkehepler.top"
// 12. 初始化全局变量
var (
qiNiuAccessKey string
qiNiuSecretKey string
)
func init() {
// 如果没有配置七牛云的key和secret那么直接panic
qiNiuAccessKey = variable.ConfigYml.GetString("QiNiu.AccessKey")
qiNiuSecretKey = variable.ConfigYml.GetString("QiNiu.SecretKey")
if qiNiuAccessKey == "" || qiNiuSecretKey == "" {
panic("七牛云配置文件中 AccessKey 或 SecretKey 为空")
}
}