Empty interface{}
Can store any type of data
But when working with slices and maps, pay attention
[]interface{} or map[string]interface{}
May make this mistake cannot use (type []string) as type []interface {}
You cannot convert []T to []interface, nor can you convert map[string]T to map[string]interface{}
The Go language specification does not allow this because the two types do not have the same representation in memory.
Need to define separately []interface{} map[string]interface{}
Copy the element you want to convert to the above type
For example, the following error:
Read More:
- Spring boot uses configuration interface webmvcconfigurer to solve cross domain problems
- [Solved] Interface automation test: JSON parse error
- [Solved] The method getContextPath() from the type HttpServletRequest refers to the missing type String
- Aspecj cannot intercept method annotations on an interface
- SSM custom 404 and 500 error reporting interface
- Sentinel could not find the urlblockhandler interface solution
- [Elasticsearch Exception]Found interface org.elasticsearch.common.bytes.BytesReference
- [Solved] Android HTTPS request resource or interface error: server certificate
- When using postman assertion, the global variables set in the tests of the pit will take effect only after the interface is executed
- Two implementation methods of spring boot scan mapper interface class
- Kettle Flash Back Error:The graphical interface cannot be opened. There is an ETI installation problem
- [Solved] Rtthread DCM component dcm_cache_save interface Error: mkdir:/data failed
- How to Solve Error: Element ‘dependency’ cannot have character [children], because the type’s content type is element-
- [Solved] Mybatis uses the PageHelper paging plugin error: Could not find method on interface ibatis.executor.Executor named query.
- [How to Solve] Nodejs: interface error CORS error
- IDEA Create Scala Project Error: scalac: Error: Error compiling the sbt component ‘compiler-interface-2.10.0-52.0‘
- ABAP: Overbooking BAPI_ACC_DOCUMENT_POST error reported FI/CO interface: inconsistent FI/CO voucher header data to be updated
- maven Error: Element ‘dependency’ cannot have character [children], because the type’s content type is
- [Solved] webService Error: webservice Interface call error reported.
- Tensorflow Run Error or the interface is stuck or report error: Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR