💡 Improve go doc comments with internal links
This commit is contained in:
parent
cdf12a767c
commit
c5a9f09166
8 changed files with 38 additions and 34 deletions
|
|
@ -11,7 +11,7 @@ type incConf struct {
|
|||
cb func(int) string
|
||||
}
|
||||
|
||||
// IncrementalOption sets an option for the Incremental Generator.
|
||||
// IncrementalOption sets an option for the [Incremental] [Generator].
|
||||
type IncrementalOption func(c *incConf)
|
||||
|
||||
// Incremental generates a name that is a series of integers.
|
||||
|
|
@ -30,21 +30,21 @@ func Incremental(opts ...IncrementalOption) Generator {
|
|||
}
|
||||
}
|
||||
|
||||
// IncrementalStart sets the starting integer for Incremental.
|
||||
// IncrementalStart sets the starting integer for [Incremental].
|
||||
func IncrementalStart(start int) IncrementalOption {
|
||||
return func(c *incConf) {
|
||||
c.start = start
|
||||
}
|
||||
}
|
||||
|
||||
// IncrementalStepsets the step by which Incremental increases with each invocation.
|
||||
// IncrementalStepsets the step by which [Incremental] increases with each invocation.
|
||||
func IncrementalStep(step int) IncrementalOption {
|
||||
return func(c *incConf) {
|
||||
c.step = step
|
||||
}
|
||||
}
|
||||
|
||||
// IncrementalFormatsets the format for the number generated by Incremental.
|
||||
// IncrementalFormatsets the format for the number generated by [Incremental].
|
||||
// It will be formatted with Printf. This is mostly likely useful with a format like "%02d".
|
||||
func IncrementalFormat(format string) IncrementalOption {
|
||||
return func(c *incConf) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue