14 type IntOption struct {
20 func NewIntOption(defaultValue int) ConfigNode {
23 opt.defaultvalue = defaultValue
29 func (opt *IntOption) String() string {
30 return fmt.Sprintf("%d", opt.Value)
33 func (opt *IntOption) Parse(newValue string) os.Error {
34 nativenv, err := strconv.Atoi(strings.TrimSpace(newValue))
44 func (opt *IntOption) IsDefault() bool {
48 func (opt *IntOption) Reset() {
49 opt.Value = opt.defaultvalue