Improve circular godoc comments flagged in review

Replace self-referential comments like 'ToSlice performs the ToSlice
operation' with meaningful descriptions of what the symbol actually does.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Kynan Ware 2026-03-04 16:34:00 -07:00
parent 07744e8e80
commit 50e65e6bab
4 changed files with 6 additions and 6 deletions

View file

@ -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"
}

View file

@ -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{})

View file

@ -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
}

View file

@ -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{})