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

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

View file

@ -97,6 +97,11 @@ func Direction() TextDirection {
return DirLTR
}
// CurrentDirection returns the current default text direction.
func CurrentDirection() TextDirection {
return Direction()
}
// IsRTL returns true if the current language uses right-to-left text.
func IsRTL() bool { return Direction() == DirRTL }

View file

@ -198,6 +198,16 @@ func TestDirection_Good(t *testing.T) {
assert.Equal(t, DirLTR, dir)
}
// --- Package-level CurrentDirection ---
func TestCurrentDirection_Good(t *testing.T) {
svc, err := New()
require.NoError(t, err)
SetDefault(svc)
assert.Equal(t, DirLTR, CurrentDirection())
}
// --- Package-level IsRTL ---
func TestIsRTL_Good(t *testing.T) {