Documentation ¶
Index ¶
- func GetSelfDefinedHeader(h http.Header, k string) string
- func GitVersion() string
- func JsonString(v interface{}) ([]byte, error)
- func LocalIP() (addr string, err error)
- func LocalIPs() (addresses []string, err error)
- func RedirectLog(logfile string, crashfile string, mode os.FileMode)
- func RemoteIP(r *http.Request) string
- func TraceStartup(msg ...string)
- type LogWriter
- type Price
- func (p *Price) Add(b float64) *Price
- func (p *Price) Div(b float64) *Price
- func (p *Price) Fixed() string
- func (p *Price) Mul(b float64) *Price
- func (p *Price) Percent(base float64) float64
- func (p *Price) Sub(b float64) *Price
- func (p *Price) Val() float64
- func (p *Price) XPercent(percent float64) *Price
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSelfDefinedHeader ¶
GetSelfDefinedHeader
func GitVersion ¶
func GitVersion() string
func JsonString ¶
统一json @TODO resp 里面的json,不能ignore json:"-" 和 omerti ; 解析 bool 为 字符串 json.Marshal 默认 escapeHtml 为true,会转义 <、>、&
func LocalIP ¶
LocalAddress 223.5.5.5 is aliyun public DNS. Google public DNS 8.8.8.8 is not connectable in China.
func LocalIPs ¶
LocalAddresses For multiple network cards (virtual network cards included, e.g. docker)
func TraceStartup ¶
func TraceStartup(msg ...string)
Types ¶
type LogWriter ¶
type LogWriter struct {
// contains filtered or unexported fields
}
func NewLogWriter ¶
Click to show internal directories.
Click to hide internal directories.