Exemplo n.º 1
0
func showUsage() {
	info := usage.NewInfo("", "file")

	info.AddOption(ARG_OUTPUT, "Path to output file", "file")
	info.AddOption(ARG_TEMPLATE, "Name of template", "name")
	info.AddOption(ARG_NAME, "Overwrite default name", "name")
	info.AddOption(ARG_NO_COLOR, "Disable colors in output")
	info.AddOption(ARG_HELP, "Show this help message")
	info.AddOption(ARG_VER, "Show version")

	info.AddExample(
		"script.sh",
		"Parse shell script and show docs in console",
	)

	info.AddExample(
		"script.sh -t markdown -o my_script.md",
		"Parse shell script and save docs using given export template",
	)

	info.AddExample(
		"script.sh someEntity",
		"Parse shell script and show docs for some constant, variable or method",
	)

	info.Render()
}
Exemplo n.º 2
0
func showUsage() {
	info := usage.NewInfo("", "host...")

	info.AddOption(ARG_FORMAT, "Output result in different formats", "text|json|yaml|xml")
	info.AddOption(ARG_DETAILED, "Show detailed info for each endpoint")
	info.AddOption(ARG_IGNORE_MISMATCH, "Proceed with assessments on certificate mismatch")
	info.AddOption(ARG_AVOID_CACHE, "Disable cache usage")
	info.AddOption(ARG_PUBLIC, "Publish results on sslscan.com")
	info.AddOption(ARG_PERFECT, "Return non-zero exit code if not A+")
	info.AddOption(ARG_NOTIFY, "Notify when check is done")
	info.AddOption(ARG_QUIET, "Don't show any output")
	info.AddOption(ARG_NO_COLOR, "Disable colors in output")
	info.AddOption(ARG_HELP, "Show this help message")
	info.AddOption(ARG_VER, "Show version")

	info.AddExample("google.com", "Check google.com")
	info.AddExample("-P google.com", "Check google.com and return zero exit code only if result is perfect (A+)")
	info.AddExample("-p -c google.com", "Check google.com, publish results, disable cache usage")
	info.AddExample("hosts.txt", "Check all hosts defined in hosts.txt file")

	info.Render()
}