Browse Source

seaprate values into their own files

pull/16/head
Brett Langdon 11 years ago
parent
commit
ca72af6cf3
6 changed files with 45 additions and 40 deletions
  1. +9
    -0
      config/boolean.go
  2. +0
    -40
      config/config.go
  3. +9
    -0
      config/float.go
  4. +9
    -0
      config/integer.go
  5. +9
    -0
      config/null.go
  6. +9
    -0
      config/string.go

+ 9
- 0
config/boolean.go View File

@ -0,0 +1,9 @@
package config
type BooleanValue struct {
Name string
Value bool
}
func (this BooleanValue) GetType() ConfigType { return BOOLEAN }
func (this BooleanValue) GetValue() interface{} { return this.Value }

+ 0
- 40
config/config.go View File

@ -37,43 +37,3 @@ type ConfigValue interface {
GetType() ConfigType GetType() ConfigType
GetValue() interface{} GetValue() interface{}
} }
type BooleanValue struct {
Name string
Value bool
}
func (this BooleanValue) GetType() ConfigType { return BOOLEAN }
func (this BooleanValue) GetValue() interface{} { return this.Value }
type NullValue struct {
Name string
Value interface{}
}
func (this NullValue) GetType() ConfigType { return NULL }
func (this NullValue) GetValue() interface{} { return nil }
type IntegerValue struct {
Name string
Value int64
}
func (this IntegerValue) GetType() ConfigType { return INTEGER }
func (this IntegerValue) GetValue() interface{} { return this.Value }
type FloatValue struct {
Name string
Value float64
}
func (this FloatValue) GetType() ConfigType { return INTEGER }
func (this FloatValue) GetValue() interface{} { return this.Value }
type StringValue struct {
Name string
Value string
}
func (this StringValue) GetType() ConfigType { return STRING }
func (this StringValue) GetValue() interface{} { return this.Value }

+ 9
- 0
config/float.go View File

@ -0,0 +1,9 @@
package config
type FloatValue struct {
Name string
Value float64
}
func (this FloatValue) GetType() ConfigType { return INTEGER }
func (this FloatValue) GetValue() interface{} { return this.Value }

+ 9
- 0
config/integer.go View File

@ -0,0 +1,9 @@
package configTypes
type IntegerValue struct {
Name string
Value int64
}
func (this IntegerValue) GetType() ConfigType { return INTEGER }
func (this IntegerValue) GetValue() interface{} { return this.Value }

+ 9
- 0
config/null.go View File

@ -0,0 +1,9 @@
package configTypes
type NullValue struct {
Name string
Value interface{}
}
func (this NullValue) GetType() ConfigType { return NULL }
func (this NullValue) GetValue() interface{} { return nil }

+ 9
- 0
config/string.go View File

@ -0,0 +1,9 @@
package configTypes
type StringValue struct {
Name string
Value string
}
func (this StringValue) GetType() ConfigType { return STRING }
func (this StringValue) GetValue() interface{} { return this.Value }

Loading…
Cancel
Save