Include * in documented flag value type when applicable

This commit is contained in:
Dan Buch 2022-05-04 23:11:05 -04:00
parent 71cd131794
commit 2ac3904d12
Signed by: meatballhat
GPG Key ID: A12F782281063434
2 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@
package {{.PackageName}}
{{range .SortedFlagTypes}}
// {{.TypeName}} is a flag with type {{.GoType}}
// {{.TypeName}} is a flag with type {{if .ValuePointer}}*{{end}}{{.GoType}}
type {{.TypeName}} struct {
Name string

View File

@ -4,7 +4,7 @@ package cli
import "time"
// Float64SliceFlag is a flag with type Float64Slice
// Float64SliceFlag is a flag with type *Float64Slice
type Float64SliceFlag struct {
Name string
@ -69,7 +69,7 @@ func (f *GenericFlag) Names() []string {
return FlagNames(f.Name, f.Aliases)
}
// Int64SliceFlag is a flag with type Int64Slice
// Int64SliceFlag is a flag with type *Int64Slice
type Int64SliceFlag struct {
Name string
@ -98,7 +98,7 @@ func (f *Int64SliceFlag) Names() []string {
return FlagNames(f.Name, f.Aliases)
}
// IntSliceFlag is a flag with type IntSlice
// IntSliceFlag is a flag with type *IntSlice
type IntSliceFlag struct {
Name string
@ -163,7 +163,7 @@ func (f *PathFlag) Names() []string {
return FlagNames(f.Name, f.Aliases)
}
// StringSliceFlag is a flag with type StringSlice
// StringSliceFlag is a flag with type *StringSlice
type StringSliceFlag struct {
Name string
@ -194,7 +194,7 @@ func (f *StringSliceFlag) Names() []string {
return FlagNames(f.Name, f.Aliases)
}
// TimestampFlag is a flag with type Timestamp
// TimestampFlag is a flag with type *Timestamp
type TimestampFlag struct {
Name string