diff --git a/internal/authflow/flow.go b/internal/authflow/flow.go index e9777f926..4bfbce97e 100644 --- a/internal/authflow/flow.go +++ b/internal/authflow/flow.go @@ -119,7 +119,7 @@ type cfg struct { token string } -// ActiveToken performs the ActiveToken operation on cfg. +// ActiveToken returns the active token and its source for the given hostname. func (c cfg) ActiveToken(hostname string) (string, string) { return c.token, "oauth_token" } diff --git a/internal/run/stub.go b/internal/run/stub.go index 60ba896ec..89c7b365b 100644 --- a/internal/run/stub.go +++ b/internal/run/stub.go @@ -12,7 +12,7 @@ const ( gitAuthRE = `-c credential(?:\..+)?\.helper= -c credential(?:\..+)?\.helper=!"[^"]+" auth git-credential ` ) -// T defines the interface for t. +// T is a minimal testing interface for use in command stubs. type T interface { Helper() Errorf(string, ...interface{}) diff --git a/pkg/set/string_set.go b/pkg/set/string_set.go index 85b6f6ab8..49e88c5d5 100644 --- a/pkg/set/string_set.go +++ b/pkg/set/string_set.go @@ -67,12 +67,12 @@ func (s *stringSet) Contains(value string) bool { return c } -// Len returns the number of elements in stringSet. +// Len returns the number of elements in the set. func (s *stringSet) Len() int { return len(s.m) } -// ToSlice performs the ToSlice operation on stringSet. +// ToSlice returns the set elements as a slice. func (s *stringSet) ToSlice() []string { return s.v } diff --git a/test/helpers.go b/test/helpers.go index 666475080..259403ba3 100644 --- a/test/helpers.go +++ b/test/helpers.go @@ -17,7 +17,7 @@ func (c CmdOut) String() string { return c.OutBuf.String() } -// Stderr performs the Stderr operation on CmdOut. +// Stderr returns the captured stderr output as a string. func (c CmdOut) Stderr() string { return c.ErrBuf.String() } @@ -44,7 +44,7 @@ func (s OutputStub) Run() error { return nil } -// T defines the interface for t. +// T is a minimal testing interface for use in test helpers. type T interface { Helper() Errorf(string, ...interface{})