💡 Fix some doc blocks

This commit is contained in:
Dan Jones 2025-03-15 15:35:40 -05:00
commit 5c1132e414
2 changed files with 3 additions and 2 deletions

View file

@ -9,6 +9,7 @@ type Config struct {
generator Generator generator Generator
} }
// NewConfig returns a new Config with the specified Options.
func NewConfig(options ...Option) Config { func NewConfig(options ...Option) Config {
conf := Config{ conf := Config{
extension: ".txt", extension: ".txt",

View file

@ -2,9 +2,9 @@ package nomino
import "fmt" import "fmt"
// Make generates a random filename. The behavior can be controlled by specifying Options // Make generates a random filename. The behavior can be controlled by specifying Options.
// In general, the final filename will be [prefix]_[generated_string]_[original_filename]_[suffix].[extension]. // In general, the final filename will be [prefix]_[generated_string]_[original_filename]_[suffix].[extension].
// If the name generator returns an error (generally, it shouldn't), that will be returned instead. // If the name generator returns an error (generally, it shouldn't), that error will be returned instead.
func Make(conf Config, opts ...Option) (string, error) { func Make(conf Config, opts ...Option) (string, error) {
for _, opt := range opts { for _, opt := range opts {
opt(&conf) opt(&conf)