mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-07 17:23:42 +08:00
fix: fix postgresql support (#606)
* fix postgresql support fixes #517 * fix: fix pg support * chore: delete useless code --------- Co-authored-by: JustSong <songquanpeng@foxmail.com>
This commit is contained in:
@@ -199,3 +199,11 @@ func GetOrDefault(env string, defaultValue int) int {
|
||||
func MessageWithRequestId(message string, id string) string {
|
||||
return fmt.Sprintf("%s (request id: %s)", message, id)
|
||||
}
|
||||
|
||||
func String2Int(str string) int {
|
||||
num, err := strconv.Atoi(str)
|
||||
if err != nil {
|
||||
return 0
|
||||
}
|
||||
return num
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user