| const networkTopologyDir string = "topo-network/" |
| const containerTopologyDir string = "topo-containers/" |
| type ActionResult struct { |
| func assertFileSize(f1, f2 string) error { |
| if fi1.Size() != fi2.Size() { |
| return fmt.Errorf("file sizes differ (%d vs %d)", fi1.Size(), fi2.Size()) |
| func (c *Stanza) newStanza(name string) *Stanza { |
| c.append("\n" + name + " {") |
| func (c *Stanza) append(name string) *Stanza { |
| c.content += strings.Repeat(" ", c.pad) |
| func (c *Stanza) close() *Stanza { |
| func (s *Stanza) toString() string { |
| func (s *Stanza) saveToFile(fileName string) error { |
| fo, err := os.Create(fileName) |
| _, err = io.Copy(fo, strings.NewReader(s.content)) |