Skip to content

Commit

Permalink
Merge pull request #91 from endocode/iaguis/add-newunitoption
Browse files Browse the repository at this point in the history
unit: add NewUnitOption convenience function
  • Loading branch information
jonboulle committed Jun 10, 2015
2 parents d7b0894 + 1f50a5e commit be94bc7
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 be94bc7

Please sign in to comment.