Apply suggestions from code review
Co-Authored-By: mgritter <mgritter@gmail.com>
This commit is contained in:
parent
4e22fb6704
commit
2835131117
|
@ -129,7 +129,7 @@ func TestPki_FetchCertBySerial(t *testing.T) {
|
|||
// Demonstrate that multiple OUs in the name are handled in an
|
||||
// order-preserving way.
|
||||
func TestPki_MultipleOUs(t *testing.T) {
|
||||
var b backend;
|
||||
var b backend
|
||||
fields := addCACommonFields(map[string]*framework.FieldSchema{})
|
||||
|
||||
apiData := &framework.FieldData{
|
||||
|
|
|
@ -244,8 +244,8 @@ func RemoveDuplicates(items []string, lowercase bool) []string {
|
|||
// In all cases, strings are compared after trimming whitespace
|
||||
// If caseInsensitive, strings will be compared after ToLower()
|
||||
func RemoveDuplicatesStable(items []string, caseInsensitive bool) []string {
|
||||
itemsMap := map[string]bool{}
|
||||
deduplicated := make([]string, 0, len(itemsMap))
|
||||
itemsMap := make(map[string]bool, len(items))
|
||||
deduplicated := make([]string, 0, len(items))
|
||||
|
||||
for _, item := range items {
|
||||
key := strings.TrimSpace(item)
|
||||
|
|
Loading…
Reference in a new issue