INNER CODE UNIT · Go

versionString

casosorg/casos · main.go:39

func versionString() string {
	return fmt.Sprintf("casos %s (commit %s, built %s, %s %s/%s)",
		version, commit, date, runtime.Version(), runtime.GOOS, runtime.GOARCH)
}

func init() {
	// CasOS runs kube-scheduler and kube-controller-manager in-process, and both
	// are cobra commands (see server.StartScheduler and
	// server.StartControllerManager). On Windows, cobra assumes a cobra command
	// launched from Explorer is a CLI the user double-clicked by mistake, and
	// answers by printing a notice and calling os.Exit(1) — which takes the whole
	// of CasOS down with it, seconds after an apparently successful startup, and
	// only ever when started by double-click.
	//
	// CasOS is a server that merely embeds those commands, so that guard is never
	// wanted here. Clearing the text disables it, and clearing it unconditionally
	// means no second launch detector has to agree with cobra's for CasOS to
	// survive.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…