Files
wehub-resource-sync f6211b6268
CI / Unit tests (push) Has been cancelled
CI / commit_lint (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:37:24 +08:00

15 lines
292 B
Go
Raw Permalink 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 common
import (
"fmt"
"github.com/songquanpeng/one-api/common/config"
)
func LogQuota(quota int64) string {
if config.DisplayInCurrencyEnabled {
return fmt.Sprintf("%.6f 额度", float64(quota)/config.QuotaPerUnit)
} else {
return fmt.Sprintf("%d 点额度", quota)
}
}