cmd

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "1.1.8"
	RootCmd = &cobra.Command{
		Version: Version,
		Use:     "clilol",
		Short:   "a CLI for omg.lol",
		Long: `This is clilol, a CLI for omg.lol.
Full documentation is available at https://clilol.readthedocs.io`,
	}
)

Functions

func Execute

func Execute() error

Types

type FlexID added in v1.1.7

type FlexID string

FlexID handles JSON fields that can be either an int/float or a string, which is necessary because the omg.lol API returns numeric IDs for older records but alphanumeric hex strings for newer records.

func (FlexID) String added in v1.1.7

func (f FlexID) String() string

func (*FlexID) UnmarshalJSON added in v1.1.7

func (f *FlexID) UnmarshalJSON(b []byte) error

type FlexTime added in v1.1.9

type FlexTime struct {
	time.Time
}

FlexTime represents a time.Time that won't fail to unmarshal if the API returns something that isn't a string (like null, false, or an empty object) due to API bugs with malformed records.

func (FlexTime) MarshalJSON added in v1.1.9

func (f FlexTime) MarshalJSON() ([]byte, error)

func (*FlexTime) UnmarshalJSON added in v1.1.9

func (f *FlexTime) UnmarshalJSON(b []byte) error

type Theme

type Theme struct {
	ID            string `json:"id"`
	Name          string `json:"name"`
	Created       string `json:"created"`
	Updated       string `json:"updated"`
	Author        string `json:"author"`
	AuthorURL     string `json:"author_url"`
	Version       string `json:"version"`
	License       string `json:"license"`
	Description   string `json:"description"`
	PreviewCSS    string `json:"preview_css"`
	SampleProfile string `json:"sample_profile"`
	ThemeColor    string `json:"theme-color"`
}

Jump to

Keyboard shortcuts

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