ta := topo.NewTabletAlias("cell1", "ks1", "0", topo.TYPE_REPLICA) fmt.Println(ta.String())
cell1-ks1-0-R
ta, err := topo.ParseTabletAliasString("cell2-ks2-1-RDONLY") if err != nil { fmt.Println(err) } fmt.Println(ta)
cell2-ks2-1-RDONLYIn this example, a TabletAlias string is parsed into a new TabletAlias object. The error return value is checked, and the string representation of the TabletAlias is printed. Overall, this package library provides functionality for managing the topology of a distributed systems, and TabletAlias String is just one of the many objects used in this system.