internal/webfetch/help.go

package webfetch

import "git.cafe/ezterry/ez-agent/internal/webfetchhelp"

func informationText(info Information) (string, bool) {
	switch info {
	case InformationHelp:
		return webfetchhelp.General(), true
	case InformationHelpHTTP:
		return webfetchhelp.HTTP(), true
	case InformationHelpHTML:
		return webfetchhelp.HTML(), true
	case InformationHelpWebSocket:
		return webfetchhelp.WebSocket(), true
	case InformationHelpFramed:
		return webfetchhelp.Framed(), true
	case InformationHelpAll:
		return webfetchhelp.All(), true
	default:
		return "", false
	}
}

func informationOption(info Information) string {
	switch info {
	case InformationHelpHTTP:
		return "--help-http"
	case InformationHelpHTML:
		return "--help-html"
	case InformationHelpWebSocket:
		return "--help-websocket"
	case InformationHelpFramed:
		return "--help-framed"
	default:
		return "--help"
	}
}