Skip to content

Commit

Permalink
unit: add NewUnitOption convenience function
Browse files Browse the repository at this point in the history
  • Loading branch information
iaguis committed Jun 10, 2015
1 parent d7b0894 commit 1f50a5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions unit/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ type UnitOption struct {
Value string
}

func NewUnitOption(section, name, value string) *UnitOption {
return &UnitOption{Section: section, Name: name, Value: value}
}

func (uo *UnitOption) String() string {
return fmt.Sprintf("{Section: %q, Name: %q, Value: %q}", uo.Section, uo.Name, uo.Value)
}
Expand Down

0 comments on commit 1f50a5e

Please sign in to comment.