all repos — emoji @ 2540f5f5afd4359e8d91211d80b850bab60d96aa

A minimalistic emoji package for Go (golang)

generator: fix links on templates
Enes Çakır enes@cakir.web.tr
Sun, 08 Mar 2020 15:58:56 +0300
commit

2540f5f5afd4359e8d91211d80b850bab60d96aa

parent

a87a93aec4b8d9b19ca954cf8507563f91df277c

3 files changed, 7 insertions(+), 7 deletions(-)

jump to
M constants.goconstants.go

@@ -3,7 +3,7 @@

// Code generated by github.com/enescakir/emoji/internal/generator DO NOT EDIT. // Source: https://unicode.org/Public/emoji/13.0/emoji-test.txt -// Create at: 2020-03-08T02:15:40+03:00 +// Create at: 2020-03-08T15:58:37+03:00 var (
M internal/generator/main.gointernal/generator/main.go

@@ -38,11 +38,11 @@

constants := generateConstants(emojis) aliases := generateAliases(emojis, gemojis) - if err = save(constantsFile, constants); err != nil { + if err = save(constantsFile, emojiListURL, constants); err != nil { panic(err) } - if err = save(aliasesFile, aliases); err != nil { + if err = save(aliasesFile, gemojiURL, aliases); err != nil { panic(err) } }

@@ -134,7 +134,7 @@ }

return r } -func save(filename, data string) error { +func save(filename, url, data string) error { tmpl, err := template.ParseFiles(fmt.Sprintf("internal/generator/%v.tmpl", filename)) if err != nil { return err

@@ -145,7 +145,7 @@ Link string

Date string Data string }{ - Link: emojiListUrl, + Link: url, Date: time.Now().Format(time.RFC3339), Data: data, }
M map.gomap.go

@@ -2,8 +2,8 @@ package emoji

// Code generated by github.com/enescakir/emoji/internal/generator DO NOT EDIT. -// Source: https://unicode.org/Public/emoji/13.0/emoji-test.txt -// Create at: 2020-03-08T02:15:40+03:00 +// Source: https://raw.githubusercontent.com/github/gemoji/master/db/emoji.json +// Create at: 2020-03-08T15:58:37+03:00 var emojiMap = map[string]string{ ":+1:": "\U0001f44d",