INNER CODE UNIT · Go

children

dropbox/dbxcli · tools/gen-docs/main.go:111

	children := append([]*cobra.Command{}, command.Commands()...)
	sort.Slice(children, func(i, j int) bool {
		return children[i].Name() < children[j].Name()
	})
	for _, child := range children {
		if err := walkCommands(child, fn); err != nil {
			return err
		}
	}
	return nil
}

func insertMetadataSection(contents []byte, section []byte) []byte {
	marker := []byte("\n### SEE ALSO\n\n")
	index := bytes.Index(contents, marker)
	if index == -1 {
		return append(append(contents, '\n'), section...)
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…