github.com/wangyougui/gf/v2@v2.6.5/container/gvar/gvar_scan.go (about)

     1  // Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
     2  //
     3  // This Source Code Form is subject to the terms of the MIT License.
     4  // If a copy of the MIT was not distributed with this file,
     5  // You can obtain one at https://github.com/wangyougui/gf.
     6  
     7  package gvar
     8  
     9  import (
    10  	"github.com/wangyougui/gf/v2/util/gconv"
    11  )
    12  
    13  // Scan automatically checks the type of `pointer` and converts `params` to `pointer`. It supports `pointer`
    14  // with type of `*map/*[]map/*[]*map/*struct/**struct/*[]struct/*[]*struct` for converting.
    15  //
    16  // See gconv.Scan.
    17  func (v *Var) Scan(pointer interface{}, mapping ...map[string]string) error {
    18  	return gconv.Scan(v.Val(), pointer, mapping...)
    19  }