Skip to content

Commit

Permalink
Update godoc
Browse files Browse the repository at this point in the history
  • Loading branch information
kkyr committed Dec 12, 2023
1 parent ff79b85 commit ba54e94
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions fig.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,32 @@ const (
//
// Example:
//
// type ListenerType uint
// type ListenerType uint

// const (
// ListenerUnix ListenerType = iota
// ListenerTCP
// ListenerTLS
// )
//
// const (
// ListenerUnix ListenerType = iota
// ListenerTCP
// ListenerTLS
// )
// type Config struct {
// Listener ListenerType `fig:"listener_type" default:"unix"`
// }
//
// type Config struct {
// Listener ListenerType `fig:"listener_type" default:"unix"`
// }
// func (l *ListenerType) UnmarshalType(v string) error {
// switch strings.ToLower(v) {
// case "unix":
// *l = ListenerUnix
// case "tcp":
// *l = ListenerTCP
// case "tls":
// *l = ListenerTLS
// default:
// return fmt.Errorf("unknown listener type: %s", v)
// }
// return nil
// }
//
// func (l *ListenerType) UnmarshalType(v string) error {
// switch strings.ToLower(v) {
// case "unix":
// *l = ListenerUnix
// case "tcp":
// *l = ListenerTCP
// case "tls":
// *l = ListenerTLS
// default:
// return fmt.Errorf("unknown listener type: %s", v)
// }
// return nil
// }
type StringUnmarshaler interface {
UnmarshalString(s string) error
}
Expand Down

0 comments on commit ba54e94

Please sign in to comment.