From 32d7c6afea1586eccec5620a5ec2a5a944f14180 Mon Sep 17 00:00:00 2001 From: Jules Casteran Date: Mon, 19 Sep 2022 10:29:41 +0200 Subject: [PATCH] feat(strcase): add dhcp-id bash name --- strcase/bash_arg.go | 7 ++++--- strcase/strcase_test.go | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/strcase/bash_arg.go b/strcase/bash_arg.go index efd05a4c3..069647f25 100644 --- a/strcase/bash_arg.go +++ b/strcase/bash_arg.go @@ -3,9 +3,10 @@ package strcase import "strings" var customBashNames = map[string]string{ - "aclid": "acl-id", - "ipid": "ip-id", - "lbid": "lb-id", + "aclid": "acl-id", + "ipid": "ip-id", + "lbid": "lb-id", + "dhcpid": "dhcp-id", } // ToBashArg returns the Bash public name of the given string. diff --git a/strcase/strcase_test.go b/strcase/strcase_test.go index 8fb6fc8fd..868c79e85 100644 --- a/strcase/strcase_test.go +++ b/strcase/strcase_test.go @@ -49,6 +49,7 @@ func TestAllStrCases(t *testing.T) { {"ip-id", "IPID", "ipID", "ip-id"}, {"lb-id", "LBID", "lbID", "lb-id"}, {"acl-id", "ACLID", "aclID", "acl-id"}, + {"dhcp-id", "DHCPID", "dhcpID", "dhcp-id"}, } for _, test := range tests { got := ToPublicGoName(test.name)