Skip to content

Commit

Permalink
remove debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
danryan committed Jul 6, 2014
1 parent 751c590 commit bc567f4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions var.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"os"
"reflect"
_ "regexp"
"strconv"
"strings"
)
Expand Down Expand Up @@ -38,10 +39,10 @@ func NewVar(field reflect.StructField) (*Var, error) {

// Check if we have a default value to set, otherwise set the type's zero value
if newVar.Default != reflect.ValueOf(nil) {
fmt.Println("setting default:", newVar.Default.String())
// fmt.Println("setting default:", newVar.Default.String())
newVar.SetValue(newVar.Default)
} else {
fmt.Println("No default; setting zero value")
// fmt.Println("No default; setting zero value")
newVar.SetValue(reflect.Zero(newVar.Type))
}
}
Expand Down Expand Up @@ -96,6 +97,12 @@ func (v *Var) SetOptions(values []reflect.Value) {

// SetKey sets Var.Key
func (v *Var) SetKey(value string) {
// src := []byte(value)
// regex := regexp.MustCompile("[0-9A-Za-z]+")
// chunks := regex.FindAll(src, -1)
// for i, val := range chunks {
//
// }
v.Key = strings.ToUpper(value)
}

Expand Down

0 comments on commit bc567f4

Please sign in to comment.