-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow identification of type of PathOrContent #16
Allow identification of type of PathOrContent #16
Conversation
Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, just those fields cannot be nil, which can simplify the code.
extkingpin/pathorcontent.go
Outdated
func (p *PathOrContent) Path() string { | ||
if p.path != nil { | ||
return *p.path | ||
} | ||
return "" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func (p *PathOrContent) Path() string { | |
if p.path != nil { | |
return *p.path | |
} | |
return "" | |
} | |
func (p *PathOrContent) Path() string { | |
return *p.path | |
} |
This is enough.
Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>
Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>
Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>
Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Signed-off-by: Douglas Camata 159076+douglascamata@users.noreply.github.com
I wanted to integrate
extkingpin.PathOrContent
with https://github.com/fsnotify/fsnotify to reload configuration when a path is used and the indicated file changes, but it's not achievable without this.