MCPcopy Index your code
hub / github.com/g3n/engine / AttribCheckEdge

Function AttribCheckEdge

gui/builder.go:702–718  ·  view source on GitHub ↗

AttribCheckEdge checks and converts attribute with name of layout edge

(b *Builder, am map[string]interface{}, fname string)

Source from the content-addressed store, hash-verified

700
701// AttribCheckEdge checks and converts attribute with name of layout edge
702func AttribCheckEdge(b *Builder, am map[string]interface{}, fname string) error {
703
704 v := am[fname]
705 if v == nil {
706 return nil
707 }
708 vs, ok := v.(string)
709 if !ok {
710 return b.err(am, fname, "Invalid edge name")
711 }
712 edge, ok := mapEdgeName[vs]
713 if !ok {
714 return b.err(am, fname, "Invalid edge name")
715 }
716 am[fname] = edge
717 return nil
718}
719
720// AttribCheckLayout checks and converts layout attribute
721func AttribCheckLayout(b *Builder, am map[string]interface{}, fname string) error {

Callers

nothing calls this directly

Calls 1

errMethod · 0.80

Tested by

no test coverage detected