SpringUtils

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 6 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyBean

func CopyBean(src interface{}, dest interface{}) error

使用反射直接赋值的方式拷贝,不支持匿名字段,不支持类型转换。 TODO 完善该方法,可以参考 json 序列化,需要进行性能测试。

func CopyBeanUseJson

func CopyBeanUseJson(src interface{}, dest interface{}) error

使用 json 序列化框架进行拷贝,支持匿名字段,支持类型转换。

func LoadXmlConfig

func LoadXmlConfig(path string, config interface{}) error

加载 XML 配置文件

func LocalIPv4

func LocalIPv4() string

获取本机的 IPv4 地址

func String

func String(err error) string

获取 error 的字符串

func ToJson

func ToJson(i interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL