cmd

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2022 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "dev"     // Version is the current version of the program
	Commit  = "none"    // Commit is the commit hash of the current build
	Date    = "unknown" // Date is the time the program was built
	BuiltBy = "unknown" // BuiltBy is how the program was built (unknown, goreleaser, etc)
)
View Source
var CTFDSubmission string
View Source
var CTFDSubmissionID int
View Source
var EventID int // EventID is the ID of the event to retrieve
View Source
var TeamID int // TeamID is the ID of the team

Functions

func CheckErr added in v0.0.24

func CheckErr(msg interface{})

CheckErr prints the msg with the prefix 'Error:' and exits. If the msg is nil, it does nothing.

func CheckWarn added in v0.1.1

func CheckWarn(msg interface{})

CheckWarn prints the msg with the prefix 'Warning:'. If the msg is nil, it does nothing.

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GetRateLimit added in v0.0.23

func GetRateLimit() ratelimit.Limiter

func ShowHelp added in v0.1.2

func ShowHelp(cmd *cobra.Command, msg interface{})

ShowHelp prints the help for the command. If the msg is not nil, it prints the msg after the help.

Types

type Emoji

type Emoji string // Emoji is a custom type for emojis

!TODO: Change this to use an emoji parser

var (
	SpeechBalloon  Emoji = "\U0001f4ac" // speech balloon
	TriangularFlag Emoji = "\U0001f6a9" // triangular flag
	// SUBGROUP: keycaps
	KeycapHash     Emoji = "#\ufe0f\u20e3" // keycap: #
	KeycapAsterisk Emoji = "*\ufe0f\u20e3" // keycap: *
	Keycap0        Emoji = "0\ufe0f\u20e3" // keycap: 0
	Keycap1        Emoji = "1\ufe0f\u20e3" // keycap: 1
	Keycap2        Emoji = "2\ufe0f\u20e3" // keycap: 2
	Keycap3        Emoji = "3\ufe0f\u20e3" // keycap: 3
	Keycap4        Emoji = "4\ufe0f\u20e3" // keycap: 4
	Keycap5        Emoji = "5\ufe0f\u20e3" // keycap: 5
	Keycap6        Emoji = "6\ufe0f\u20e3" // keycap: 6
	Keycap7        Emoji = "7\ufe0f\u20e3" // keycap: 7
	Keycap8        Emoji = "8\ufe0f\u20e3" // keycap: 8
	Keycap9        Emoji = "9\ufe0f\u20e3" // keycap: 9
	Keycap10       Emoji = "\U0001f51f"    // keycap: 10
	// SUBGROUP: time
	HourglassDone    Emoji = "\u231b"           // hourglass done
	HourglassNotDone Emoji = "\u23f3"           // hourglass not done
	Watch            Emoji = "\u231a"           // watch
	AlarmClock       Emoji = "\u23f0"           // alarm clock
	Stopwatch        Emoji = "\u23f1\ufe0f"     // stopwatch
	TimerClock       Emoji = "\u23f2\ufe0f"     // timer clock
	MantelpieceClock Emoji = "\U0001f570\ufe0f" // mantelpiece clock
	TwelveOClock     Emoji = "\U0001f55b"       // twelve o’clock
	TwelveThirty     Emoji = "\U0001f567"       // twelve-thirty
	OneOClock        Emoji = "\U0001f550"       // one o’clock
	OneThirty        Emoji = "\U0001f55c"       // one-thirty
	TwoOClock        Emoji = "\U0001f551"       // two o’clock
	TwoThirty        Emoji = "\U0001f55d"       // two-thirty
	ThreeOClock      Emoji = "\U0001f552"       // three o’clock
	ThreeThirty      Emoji = "\U0001f55e"       // three-thirty
	FourOClock       Emoji = "\U0001f553"       // four o’clock
	FourThirty       Emoji = "\U0001f55f"       // four-thirty
	FiveOClock       Emoji = "\U0001f554"       // five o’clock
	FiveThirty       Emoji = "\U0001f560"       // five-thirty
	SixOClock        Emoji = "\U0001f555"       // six o’clock
	SixThirty        Emoji = "\U0001f561"       // six-thirty
	SevenOClock      Emoji = "\U0001f556"       // seven o’clock
	SevenThirty      Emoji = "\U0001f562"       // seven-thirty
	EightOClock      Emoji = "\U0001f557"       // eight o’clock
	EightThirty      Emoji = "\U0001f563"       // eight-thirty
	NineOClock       Emoji = "\U0001f558"       // nine o’clock
	NineThirty       Emoji = "\U0001f564"       // nine-thirty
	TenOClock        Emoji = "\U0001f559"       // ten o’clock
	TenThirty        Emoji = "\U0001f565"       // ten-thirty
	ElevenOClock     Emoji = "\U0001f55a"       // eleven o’clock
	ElevenThirty     Emoji = "\U0001f566"       // eleven-thirty
	HyperLink        Emoji = "\U0001f517"       // link
)

type Response added in v0.1.4

type Response struct {
	Name    string `json:"name"`
	Zipball string `json:"zipball_url"`
	Tarball string `json:"tarball_url"`
	Commit  struct {
		Sha string `json:"sha"`
		URL string `json:"url"`
	} `json:"commit"`
	NodeID string `json:"node_id"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL