diff options
Diffstat (limited to 'build/generate-emoji.go')
-rw-r--r-- | build/generate-emoji.go | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/build/generate-emoji.go b/build/generate-emoji.go index aa56d45f74..2f3536342d 100644 --- a/build/generate-emoji.go +++ b/build/generate-emoji.go @@ -30,9 +30,7 @@ const ( maxUnicodeVersion = 12 ) -var ( - flagOut = flag.String("o", "modules/emoji/emoji_data.go", "out") -) +var flagOut = flag.String("o", "modules/emoji/emoji_data.go", "out") // Gemoji is a set of emoji data. type Gemoji []Emoji @@ -68,7 +66,7 @@ func main() { } // write - err = os.WriteFile(*flagOut, buf, 0644) + err = os.WriteFile(*flagOut, buf, 0o644) if err != nil { log.Fatal(err) } @@ -109,7 +107,7 @@ func generate() ([]byte, error) { return nil, err } - var skinTones = make(map[string]string) + skinTones := make(map[string]string) skinTones["\U0001f3fb"] = "Light Skin Tone" skinTones["\U0001f3fc"] = "Medium-Light Skin Tone" @@ -119,7 +117,7 @@ func generate() ([]byte, error) { var tmp Gemoji - //filter out emoji that require greater than max unicode version + // filter out emoji that require greater than max unicode version for i := range data { val, _ := strconv.ParseFloat(data[i].UnicodeVersion, 64) if int(val) <= maxUnicodeVersion { @@ -158,7 +156,7 @@ func generate() ([]byte, error) { // write a JSON file to use with tribute (write before adding skin tones since we can't support them there yet) file, _ := json.Marshal(data) - _ = os.WriteFile("assets/emoji.json", file, 0644) + _ = os.WriteFile("assets/emoji.json", file, 0o644) // Add skin tones to emoji that support it var ( |