func (s *Removed) stateForSpecificPlatform() (state.State, error) {
	p, err := platform.Identify()
	if err != nil {
		return nil, err
	}
	switch platform.Family(p.Get("family")) {
	case platform.FamilyDebian:
		return &RemovedForDebian{s}, nil
	}
	return nil, errors.New("unsupported platform")
}
Пример #2
0
func usage() {
	usage := `
Usage: opit COMMAND [ARGUMENTS]

opit is a command line interface of orchestra-pit.
`

	fmt.Println(strings.TrimSpace(usage))
	fmt.Println("\nCommands:")
	for name, command := range commands {
		fmt.Printf("  %-8s %s\n", name, command.description())
	}

	fmt.Println("")

	fmt.Println("Use \"opit COMMAND -h\" for more information about the commands.")

	p, err := platform.Identify()
	if err == nil {
		if platform.Family(p.Get("family")) == platform.FamilyDebian {
			fmt.Println("\n -- opit has Super Cow Powers now --")
		}
	}
}