Function relocation.
This commit is contained in:
parent
de34095ece
commit
1ae76d5efd
7 changed files with 15 additions and 10 deletions
|
|
@ -6,6 +6,7 @@ import (
|
|||
"go/format"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
|
@ -154,3 +155,7 @@ func FormatTimestamp(t time.Time) []byte {
|
|||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func IsNil(v interface{}) bool {
|
||||
return v == nil || (reflect.ValueOf(v).Kind() == reflect.Ptr && reflect.ValueOf(v).IsNil())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue