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)
|
||||
|
||||
for _, sv := range (svList) {
|
||||
if isValueNil(sv.value) {
|
||||
continue // Skip null values
|
||||
}
|
||||
if isValueNil(sv.value) {
|
||||
continue // Skip null values
|
||||
}
|
||||
s := sv.key
|
||||
_, err = fmt.Fprintf(w, "%d:%s", len(s), s)
|
||||
if err != nil {
|
||||
|
@ -472,14 +472,14 @@ func writeValue(w io.Writer, val reflect.Value) (err os.Error) {
|
|||
}
|
||||
|
||||
func isValueNil(val reflect.Value) bool {
|
||||
if val == nil {
|
||||
return true
|
||||
}
|
||||
if val == nil {
|
||||
return true
|
||||
}
|
||||
switch v := val.(type) {
|
||||
case *reflect.InterfaceValue:
|
||||
return isValueNil(v.Elem())
|
||||
default:
|
||||
return false
|
||||
return false
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue