mirror of
https://gitee.com/johng/gf.git
synced 2024-12-02 20:28:17 +08:00
fix issue in ghttp.Session.GetMap*
This commit is contained in:
parent
d63c2882fd
commit
8f953dabe5
@ -2,10 +2,12 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/os/gcmd"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println(gcmd.Scan("input:"))
|
||||
parse1, _ := url.Parse("https://gf.cdn.johng.cn")
|
||||
parse2, _ := url.Parse("https://gf.cdn.johng.cn/cli/")
|
||||
fmt.Println(parse1.Host)
|
||||
fmt.Println(parse2.Host)
|
||||
}
|
||||
|
@ -301,20 +301,20 @@ func (s *Session) GetDuration(key string, def ...interface{}) time.Duration {
|
||||
return gconv.Duration(s.Get(key, def...))
|
||||
}
|
||||
|
||||
func (s *Session) GetMap(value interface{}, tags ...string) map[string]interface{} {
|
||||
return gconv.Map(value, tags...)
|
||||
func (s *Session) GetMap(key string, tags ...string) map[string]interface{} {
|
||||
return gconv.Map(s.Get(key), tags...)
|
||||
}
|
||||
|
||||
func (s *Session) GetMapDeep(value interface{}, tags ...string) map[string]interface{} {
|
||||
return gconv.MapDeep(value, tags...)
|
||||
func (s *Session) GetMapDeep(key string, tags ...string) map[string]interface{} {
|
||||
return gconv.MapDeep(s.Get(key), tags...)
|
||||
}
|
||||
|
||||
func (s *Session) GetMaps(value interface{}, tags ...string) []map[string]interface{} {
|
||||
return gconv.Maps(value, tags...)
|
||||
func (s *Session) GetMaps(key string, tags ...string) []map[string]interface{} {
|
||||
return gconv.Maps(s.Get(key), tags...)
|
||||
}
|
||||
|
||||
func (s *Session) GetMapsDeep(value interface{}, tags ...string) []map[string]interface{} {
|
||||
return gconv.MapsDeep(value, tags...)
|
||||
func (s *Session) GetMapsDeep(key string, tags ...string) []map[string]interface{} {
|
||||
return gconv.MapsDeep(s.Get(key), tags...)
|
||||
}
|
||||
|
||||
func (s *Session) GetStruct(key string, pointer interface{}, mapping ...map[string]string) error {
|
||||
|
Loading…
Reference in New Issue
Block a user