MCPcopy
hub / github.com/google/mangle / makeStruct

Function makeStruct

interpreter/interpreter_test.go:172–180  ·  view source on GitHub ↗
(kvMap map[string]ast.Constant)

Source from the content-addressed store, hash-verified

170}
171
172func makeStruct(kvMap map[string]ast.Constant) ast.Constant {
173 constMap := make(map[*ast.Constant]*ast.Constant)
174 for k, v := range kvMap {
175 key := mustName("/" + k)
176 val := v
177 constMap[&key] = &val
178 }
179 return *ast.Struct(constMap)
180}

Callers 1

TestDisplayStringFunction · 0.85

Calls 2

StructFunction · 0.92
mustNameFunction · 0.85

Tested by

no test coverage detected