Executing the following code:
package main
import (
"fmt"
"github.com/kr/pretty"
)
type Foo struct {
name string
}
func main() {
fmt.Println(pretty.Diff(Foo{name: "foo"}, Foo{name: "bar"}))
}
Panics with the message:
panic: reflect.Value.Interface: cannot return value obtained from unexported field or method
I realize it may not be possible to actually produce the diff on private fields, but I doubt that a panic is what's intended.
Executing the following code:
Panics with the message:
I realize it may not be possible to actually produce the diff on private fields, but I doubt that a panic is what's intended.