feat: 优化代理服务
This commit is contained in:
16 files changed
+249
-262
No files matched your search
@@ -0,0 +1,12 @@
|
||||
package utils
|
||||
|
||||
import "fmt"
|
||||
|
||||
// MaskAPIKey masks an API key for safe logging.
|
||||
func MaskAPIKey(key string) string {
|
||||
length := len(key)
|
||||
if length <= 8 {
|
||||
return key
|
||||
}
|
||||
return fmt.Sprintf("%s****%s", key[:4], key[length-4:])
|
||||
}
|
||||
Reference in new issue
Block a user