From 6e620073f5bb05733af28fe7680991beca7de7bb Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Mon, 14 Jan 2019 17:59:31 -0800 Subject: [PATCH] Rename method Empties to HasEmpties --- authority/config.go | 2 +- authority/types.go | 4 ++-- authority/types_test.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/authority/config.go b/authority/config.go index f19fb202..a6a78523 100644 --- a/authority/config.go +++ b/authority/config.go @@ -117,7 +117,7 @@ func (c *Config) Validate() error { case c.Address == "": return errors.New("address cannot be empty") - case c.Root.Empties(): + case c.Root.HasEmpties(): return errors.New("root cannot be empty") case c.IntermediateCert == "": diff --git a/authority/types.go b/authority/types.go index 29c12282..d9120f59 100644 --- a/authority/types.go +++ b/authority/types.go @@ -49,8 +49,8 @@ func (s multiString) First() string { return "" } -// Empties returns `true` if any string in the array is empty. -func (s multiString) Empties() bool { +// HasEmpties returns `true` if any string in the array is empty. +func (s multiString) HasEmpties() bool { if len(s) == 0 { return true } diff --git a/authority/types_test.go b/authority/types_test.go index 620751d3..36877dcc 100644 --- a/authority/types_test.go +++ b/authority/types_test.go @@ -38,7 +38,7 @@ func Test_multiString_Empties(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if got := tt.s.Empties(); got != tt.want { + if got := tt.s.HasEmpties(); got != tt.want { t.Errorf("multiString.Empties() = %v, want %v", got, tt.want) } })