INNER CODE UNIT · Go

parseApplySelfArgs

kimdre/doco-cd · cmd/doco-cd/applyself.go:28

func parseApplySelfArgs(args []string) (bootstrap bool, journalID string, err error) {
	if len(args) != 1 {
		return false, "", ErrApplySelfUsage
	}

	if args[0] == "--bootstrap" {
		return true, "", nil
	}

	if args[0] == "" || args[0][0] == '-' {
		return false, "", ErrApplySelfUsage
	}

	return false, args[0], nil
}

// runApplySelf is the entry point of the throwaway clone that finishes a
// self-update, and of the one-shot bootstrap that first adopts doco-cd into

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…