Skip to content

Commit

Permalink
Re-format some comments
Browse files Browse the repository at this point in the history
This is the result of running `go fmt -mod=readonly ./...`
  • Loading branch information
dscho committed Dec 14, 2023
1 parent fb78b41 commit 69418a9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions git/gitconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ func (config *Config) FullKey(key string) string {
// a component boundary (i.e., at a '.'). If yes, it returns `true`
// and the part of the key after the prefix; e.g.:
//
// configKeyMatchesPrefix("foo.bar", "foo") → true, "bar"
// configKeyMatchesPrefix("foo.bar", "foo.") → true, "bar"
// configKeyMatchesPrefix("foo.bar", "foo.bar") → true, ""
// configKeyMatchesPrefix("foo.bar", "foo.bar.") → false, ""
// configKeyMatchesPrefix("foo.bar", "foo") → true, "bar"
// configKeyMatchesPrefix("foo.bar", "foo.") → true, "bar"
// configKeyMatchesPrefix("foo.bar", "foo.bar") → true, ""
// configKeyMatchesPrefix("foo.bar", "foo.bar.") → false, ""
func configKeyMatchesPrefix(key, prefix string) (bool, string) {
if prefix == "" {
return true, key
Expand Down
2 changes: 1 addition & 1 deletion git/reference.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type Reference struct {
// `Reference`. It is assumed that `line` is formatted like the output
// of
//
// git for-each-ref --format='%(objectname) %(objecttype) %(objectsize) %(refname)'
// git for-each-ref --format='%(objectname) %(objecttype) %(objectsize) %(refname)'
func ParseReference(line string) (Reference, error) {
words := strings.Split(line, " ")
if len(words) != 4 {
Expand Down
6 changes: 3 additions & 3 deletions internal/refopts/filter_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ func (v *filterValue) Set(s string) error {
//
// * If it is bracketed with `/` characters, treat it as a regexp.
//
// * If it starts with `@`, then consider it a refgroup name. That
// refgroup must already be defined. Use its filter. This construct
// is only allowed at the top level.
// - If it starts with `@`, then consider it a refgroup name. That
// refgroup must already be defined. Use its filter. This construct
// is only allowed at the top level.
//
// * Otherwise treat it as a prefix.
func (v *filterValue) interpretFlexibly(s string) (git.ReferenceFilter, error) {
Expand Down
8 changes: 4 additions & 4 deletions sizes/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,10 @@ func (t *Threshold) Type() string {
// A `pflag.Value` that can be used as a boolean option that sets a
// `Threshold` variable to a fixed value. For example,
//
// pflag.Var(
// sizes.NewThresholdFlagValue(&threshold, 30),
// "critical", "only report critical statistics",
// )
// pflag.Var(
// sizes.NewThresholdFlagValue(&threshold, 30),
// "critical", "only report critical statistics",
// )
//
// adds a `--critical` flag that sets `threshold` to 30.
type thresholdFlagValue struct {
Expand Down

0 comments on commit 69418a9

Please sign in to comment.