File: 0001-Use-data-from-unicode-data-package.patch

package info (click to toggle)
golang-github-mattn-go-runewidth 0.0.16-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid, trixie
  • size: 184 kB
  • sloc: makefile: 5
file content (48 lines) | stat: -rw-r--r-- 1,063 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From: Dmitry Smirnov <onlyjob@debian.org>
Date: Mon, 25 Oct 2021 00:23:44 +0800
Subject: Use data from unicode-data package

Forwarded: not-needed
---
 script/generate.go | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

--- a/script/generate.go
+++ b/script/generate.go
@@ -13,7 +13,7 @@
 	"io"
 	"io/ioutil"
 	"log"
-	"net/http"
+	"os"
 	"strings"
 )
 
@@ -180,21 +180,21 @@
 
 	fmt.Fprint(f, "package runewidth\n\n")
 
-	resp, err := http.Get("https://unicode.org/Public/15.1.0/ucd/EastAsianWidth.txt")
+	fEAW, err := os.Open("/usr/share/unicode/EastAsianWidth.txt")
 	if err != nil {
 		log.Fatal(err)
 	}
-	defer resp.Body.Close()
+	defer fEAW.Close()
 
-	eastasian(f, resp.Body)
+	eastasian(f, fEAW)
 
-	resp, err = http.Get("https://unicode.org/Public/15.1.0/ucd/emoji/emoji-data.txt")
+	fED, err := os.Open("/usr/share/unicode/emoji/emoji-data.txt")
 	if err != nil {
 		log.Fatal(err)
 	}
-	defer resp.Body.Close()
+	defer fED.Close()
 
-	emoji(f, resp.Body)
+	emoji(f, fED)
 
 	out, err := format.Source(f.Bytes())
 	if err != nil {