Skip to content

Commit 4121444

Browse files
committed
rename option
1 parent 74ccd64 commit 4121444

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

importer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type Importer struct {
2020
}
2121

2222
// NewImporter creates a new importer
23-
func NewImporter(options ...option) *Importer {
23+
func NewImporter(options ...Option) *Importer {
2424
i := &Importer{
2525
fset: token.NewFileSet(),
2626
mode: goparser.ParseComments,

option.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
package gotype
22

3-
type option func(i *Importer)
3+
type Option func(i *Importer)
44

55
// ErrorHandler returns the error handler option
6-
func ErrorHandler(f func(error)) option {
6+
func ErrorHandler(f func(error)) Option {
77
return func(i *Importer) {
88
i.errorHandler = f
99
}
1010
}
1111

1212
// WithCommentLocator sets comment locator
13-
func WithCommentLocator() option {
13+
func WithCommentLocator() Option {
1414
return func(i *Importer) {
1515
i.isCommentLocator = true
1616
}

0 commit comments

Comments
 (0)