|
@@ -2,6 +2,7 @@ package util
|
|
|
|
|
|
import (
|
|
import (
|
|
"bytes"
|
|
"bytes"
|
|
|
|
+ "crypto/rsa"
|
|
"fmt"
|
|
"fmt"
|
|
"io"
|
|
"io"
|
|
"reflect"
|
|
"reflect"
|
|
@@ -59,8 +60,16 @@ func fdump(w io.Writer, rx int, rd int, tab string, value reflect.Value) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if value.Type() == reflect.TypeOf(rsa.PublicKey{}) {
|
|
|
|
+ fmt.Fprintf(w, "- /* Type:%s */", value.Type())
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if value.Type() == reflect.TypeOf(rsa.PrivateKey{}) {
|
|
|
|
+ fmt.Fprintf(w, "- /* Type:%s */", value.Type())
|
|
|
|
+ return
|
|
|
|
+ }
|
|
ntab := tab + tabSpace
|
|
ntab := tab + tabSpace
|
|
- fmt.Fprintf(w, "{ /* Type:%s */", value.Type().String())
|
|
|
|
|
|
+ fmt.Fprintf(w, "{ /* Type:%v:%s-%s */", value.CanInterface(), value.Kind().String(), value.Type().String())
|
|
il := value.NumField()
|
|
il := value.NumField()
|
|
for i, j := 0, 0; i < il && i < MaxFieldLen; i++ {
|
|
for i, j := 0, 0; i < il && i < MaxFieldLen; i++ {
|
|
tf := value.Type().Field(i)
|
|
tf := value.Type().Field(i)
|