chore: replace all cn comments to en version by volc api (#313)

This commit is contained in:
tecvan
2025-07-31 15:18:11 +08:00
committed by GitHub
parent 91d6cdb430
commit 5abc63fba6
254 changed files with 5899 additions and 5844 deletions

View File

@@ -28,12 +28,12 @@ func TestCtxCache(t *testing.T) {
g := NewGomegaWithT(t)
ctx := context.Background()
// 测试没有 initCtxCacheData 场景
// Test without initCtxCacheData scenario
Store(ctx, "test1", "1")
_, ok := Get[string](ctx, "test1")
g.Expect(ok).Should(BeFalse())
// initCtxCacheData 场景
// There is initCtxCacheData scene
ctx = Init(ctx)
_, ok = Get[string](ctx, "test")

View File

@@ -22,17 +22,17 @@ import (
type RegisterOptionFn = internal.RegisterOption
// WithAffectStability 设置稳定性标识, true:会影响系统稳定性, 并体现在接口错误率中, false:不影响稳定性.
// WithAffectStability sets the stability flag, true: it will affect the system stability and is reflected in the interface error rate, false: it will not affect the stability.
func WithAffectStability(affectStability bool) RegisterOptionFn {
return internal.WithAffectStability(affectStability)
}
// Register 注册用户预定义的错误码信息, PSM服务对应的code_genmodule初始化时调用.
// Register the predefined error code information of the registered user, and call the code_gen sub-module corresponding to the PSM service when initializing.
func Register(code int32, msg string, opts ...RegisterOptionFn) {
internal.Register(code, msg, opts...)
}
// SetDefaultErrorCode 带有PSM信息染色的code替换默认code.
// SetDefaultErrorCode Code with PSM information staining Replace the default code.
func SetDefaultErrorCode(code int32) {
internal.SetDefaultErrorCode(code)
}