💡 Fix some doc blocks
This commit is contained in:
parent
10eb3f2491
commit
5c1132e414
2 changed files with 3 additions and 2 deletions
|
|
@ -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",
|
||||||
|
|
|
||||||
4
make.go
4
make.go
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue