Another gofmt pass.
This commit is contained in:
parent
f81cd34e34
commit
d48a378005
1 changed files with 7 additions and 7 deletions
14
struct.go
14
struct.go
|
@ -355,9 +355,9 @@ func writeSVList(w io.Writer, svList StringValueArray) (err os.Error) {
|
||||||
sort.Sort(svList)
|
sort.Sort(svList)
|
||||||
|
|
||||||
for _, sv := range (svList) {
|
for _, sv := range (svList) {
|
||||||
if isValueNil(sv.value) {
|
if isValueNil(sv.value) {
|
||||||
continue // Skip null values
|
continue // Skip null values
|
||||||
}
|
}
|
||||||
s := sv.key
|
s := sv.key
|
||||||
_, err = fmt.Fprintf(w, "%d:%s", len(s), s)
|
_, err = fmt.Fprintf(w, "%d:%s", len(s), s)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -472,14 +472,14 @@ func writeValue(w io.Writer, val reflect.Value) (err os.Error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func isValueNil(val reflect.Value) bool {
|
func isValueNil(val reflect.Value) bool {
|
||||||
if val == nil {
|
if val == nil {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
switch v := val.(type) {
|
switch v := val.(type) {
|
||||||
case *reflect.InterfaceValue:
|
case *reflect.InterfaceValue:
|
||||||
return isValueNil(v.Elem())
|
return isValueNil(v.Elem())
|
||||||
default:
|
default:
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue