diff --git a/env_short_long_name.go b/env_short_long_name.go index 35539c0..22703e5 100644 --- a/env_short_long_name.go +++ b/env_short_long_name.go @@ -12,7 +12,8 @@ var specialNames = map[string]bool{ "JSON": true, "XML": true, "YAML": true, - // Add more special names here + "URL": true, + "URI": true, } func wordStart(b byte) bool { diff --git a/env_short_long_name_test.go b/env_short_long_name_test.go index c1b583f..edfaec1 100644 --- a/env_short_long_name_test.go +++ b/env_short_long_name_test.go @@ -19,6 +19,8 @@ func Test_ShortLongName(t *testing.T) { {"_almost_all", "almost-all"}, {"LongOpt_all", "long-opt-all"}, {"JSON", "JSON"}, + {"URL", "URL"}, + {"URI", "URI"}, } { got, err := gnuOptionName(tcase.in) assert.NoError(t, err) @@ -34,6 +36,8 @@ func Test_EnvName(t *testing.T) { {"_almost_all", "ALMOST_ALL"}, {"envOpt_all", "ENV_OPT_ALL"}, {"JSON", "JSON"}, + {"URL", "URL"}, + {"URI", "URI"}, } { got, err := envOptionName(tcase.in) assert.NoError(t, err)