Source File
object_mapper.go
Belonging Package
github.com/pancsta/d2/d2layouts/d2dagrelayout
package d2dagrelayoutimport ()type objectMapper struct {objToID map[*d2graph.Object]stringidToObj map[string]*d2graph.Object}func () *objectMapper {return &objectMapper{objToID: make(map[*d2graph.Object]string),idToObj: make(map[string]*d2graph.Object),}}func ( *objectMapper) ( *d2graph.Object) {:= strconv.Itoa(len(.idToObj)).idToObj[] =.objToID[] =}func ( *objectMapper) ( *d2graph.Object) string {return .objToID[]}func ( *objectMapper) ( string) *d2graph.Object {return .idToObj[]}
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |