💡 Fix a few go doc comments

This commit is contained in:
Dan Jones 2025-03-31 15:46:48 -05:00
commit 70c74c2b03
3 changed files with 4 additions and 4 deletions

View file

@ -10,7 +10,7 @@ type Config struct {
generator Generator generator Generator
} }
// NewConfig returns a new [Config] with the specified [Option]s. // NewConfig returns a new [Config] with each [Option] specified.
// With no Options, the Config uses an extension of .txt, a separator // With no Options, the Config uses an extension of .txt, a separator
// of _, and the [UUID] [Generator]. // of _, and the [UUID] [Generator].
func NewConfig(options ...Option) Config { func NewConfig(options ...Option) Config {
@ -25,7 +25,7 @@ func NewConfig(options ...Option) Config {
return conf return conf
} }
// AddOptions creates a new [Config] with the given [Option]s added. // AddOptions creates a new [Config] with each [Option] added.
func (c Config) AddOptions(options ...Option) Config { func (c Config) AddOptions(options ...Option) Config {
for _, opt := range options { for _, opt := range options {
opt(&c) opt(&c)

View file

@ -8,7 +8,7 @@ import (
"github.com/google/uuid" "github.com/google/uuid"
) )
// UUIDer is an interface for generating UUIDs. // UUIDer is an interface for generating UUIDs, by the [UUID] [Generator].
// It is recommended that you use either the [UUIDv4] or [UUIDv7] variables. // It is recommended that you use either the [UUIDv4] or [UUIDv7] variables.
type UUIDer interface { type UUIDer interface {
UUID() (uuid.UUID, error) UUID() (uuid.UUID, error)

View file

@ -28,7 +28,7 @@ func WithGenerator(g Generator) Option {
} }
} }
// ErrMissingGenerators is returned by a multi-generator if no [Generator]s are supplied. // ErrMissingGenerators is returned by a multi-generator if a [Generator] isn't supplied.
var ErrMissingGenerators = errors.New("no generators supplied") var ErrMissingGenerators = errors.New("no generators supplied")
func missingGen(*Config) (string, error) { func missingGen(*Config) (string, error) {