MCPcopy Create free account
hub / github.com/go-python/gopy / addStdSliceMaps

Function addStdSliceMaps

bind/stdtypes.go:24–31  ·  view source on GitHub ↗

addStdSliceMaps adds std Slice and Map types to universe

()

Source from the content-addressed store, hash-verified

22
23// addStdSliceMaps adds std Slice and Map types to universe
24func addStdSliceMaps() {
25 makeGoPackage()
26 gopk := goPackage.pkg
27 sltyps := []string{"int", "int64", "int32", "int16", "int8", "uint", "uint64", "uint32", "uint16", "uint8", "bool", "byte", "rune", "float64", "float32", "string", "error"}
28 for _, tn := range sltyps {
29 universe.addSliceType(gopk, nil, types.NewSlice(universe.sym(tn).gotyp), skType, "Slice_"+tn, "[]"+tn)
30 }
31}
32
33// stdBasicTypes returns the basic int, float etc types as symbols
34func stdBasicTypes() map[string]*symbol {

Callers 1

initFunction · 0.85

Calls 3

makeGoPackageFunction · 0.85
addSliceTypeMethod · 0.80
symMethod · 0.80

Tested by

no test coverage detected