[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/i18n/RFC.md fully. Find ONE feature... #55

Merged
Virgil merged 1 commit from agent/read---spec-code-core-go-i18n-rfc-md-ful into dev 2026-04-01 23:59:35 +00:00
2 changed files with 22 additions and 0 deletions

View file

@ -33,6 +33,20 @@ func TestSetDebug_Good_ServiceLevel(t *testing.T) {
assert.False(t, svc.Debug())
}
func TestCurrentDebug_Good_PackageLevel(t *testing.T) {
svc, err := New()
require.NoError(t, err)
_ = Init()
SetDefault(svc)
SetDebug(true)
assert.True(t, CurrentDebug())
SetDebug(false)
assert.False(t, CurrentDebug())
}
func TestDebugFormat_Good(t *testing.T) {
tests := []struct {
name string

View file

@ -69,6 +69,14 @@ func CurrentFormality() Formality {
return FormalityNeutral
}
// CurrentDebug reports whether debug mode is enabled on the default service.
func CurrentDebug() bool {
if svc := Default(); svc != nil {
return svc.Debug()
}
return false
}
// N formats a number using the i18n.numeric.* namespace.
//
// N("number", 1234567) // "1,234,567"