(f *FlagSet, name string)
| 800 | } |
| 801 | |
| 802 | func aliasAndWordSepFlagNames(f *FlagSet, name string) NormalizedName { |
| 803 | seps := []string{"-", "_"} |
| 804 | |
| 805 | oldName := replaceSeparators("old-valid_flag", seps, ".") |
| 806 | newName := replaceSeparators("valid-flag", seps, ".") |
| 807 | |
| 808 | name = replaceSeparators(name, seps, ".") |
| 809 | switch name { |
| 810 | case oldName: |
| 811 | name = newName |
| 812 | } |
| 813 | |
| 814 | return NormalizedName(name) |
| 815 | } |
| 816 | |
| 817 | func TestCustomNormalizedNames(t *testing.T) { |
| 818 | f := NewFlagSet("normalized", ContinueOnError) |
nothing calls this directly
no test coverage detected