Documentation ¶
Index ¶
- Variables
- func AbsInt(i int) int
- func CheckError(action string, err error)
- func ClientIP4() ([]byte, error)
- func Compress(raw []byte, compressLevel int) ([]byte, error)
- func FakeIP() []byte
- func FileReadAll(path string) ([]byte, error)
- func GetAddressByBytes(data []byte) string
- func HashString(s string) int
- func IsEmpty(s string) bool
- func JavaFastJsonConvert(fjsonStr string) string
- func MinInt(a, b int) int
- func UnCompress(data []byte) []byte
- func WithoutNamespace(resource string) string
- func WrapNamespace(namespace, resourceWithOutNamespace string) string
- func WriteToFile(path string, data []byte) error
- type Set
- type StringUnique
- type UniqueItem
Constants ¶
This section is empty.
Variables ¶
View Source
var (
LocalIP string
)
Functions ¶
func CheckError ¶
func FileReadAll ¶
func GetAddressByBytes ¶
func JavaFastJsonConvert ¶
JavaFastJsonConvert covert java fastjson for golang `{"brokerAddrTable":{"rocketmq-fce78b93-1":{"brokerAddrs":{0:"10.10.88.243:27622",2:"10.10.88.243:27328",3:"10.10.88.243:27664"},"brokerName":"rocketmq-fce78b93-1","cluster":"rocketmq-fce78b93"},"rocketmq-fce78b93-0":{"brokerAddrs":{0:"10.10.88.243:27562",2:"10.10.88.243:27565",3:"10.10.88.243:27902"},"brokerName":"rocketmq-fce78b93-0","cluster":"rocketmq-fce78b93"}},"clusterAddrTable":{"rocketmq-fce78b93":["rocketmq-fce78b93-1","rocketmq-fce78b93-0"]}}`
func UnCompress ¶
func WithoutNamespace ¶
func WrapNamespace ¶
func WriteToFile ¶
Types ¶
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
func (*Set) Add ¶
func (s *Set) Add(v UniqueItem)
func (*Set) Items ¶
func (s *Set) Items() map[string]UniqueItem
func (*Set) MarshalJSON ¶
func (*Set) UnmarshalJSON ¶
type StringUnique ¶
type StringUnique string
func (StringUnique) UniqueID ¶
func (str StringUnique) UniqueID() string
type UniqueItem ¶
type UniqueItem interface {
UniqueID() string
}
Click to show internal directories.
Click to hide internal directories.