Documentation
¶
Index ¶
Constants ¶
const GitmojiDirName string = ".gitmoji"
GitmojiDirName is the name of the directory under the user's home directory to store the gitmoji list.
const GitmojiFileName string = "gitmojis.json"
GitmojiFileName is the name of the file to store the list of gitmoji.
const GitmojiURL string = "https://raw.githubusercontent.com/carloscuesta/gitmoji/master/packages/gitmojis/src/gitmojis.json"
GitmojiURL is the address from which to download the list of gitmoji.
Variables ¶
This section is empty.
Functions ¶
func UpdateCache ¶
func UpdateCache() error
UpdateCache checks the default URL for new gitmoji and updates the cache file in local storage if it is stale.
Types ¶
type Cache ¶
type Cache struct { CacheFile string // contains filtered or unexported fields }
Cache is a local file cache for storing gitmoji.
func NewCacheWithURLAndCacheFile ¶
NewCacheWithURLAndCacheFile returns a gitmoji cache of a custom URL and local storage location. This method is intended to be used for testing only.
func (*Cache) GetGitmoji ¶
GetGitmoji gets the gitmoji list from a local file cache if available; otherwise, downloads the latest gitmoji list from github.com.