Skip to content

Commit a7b35a8

Browse files
committed
remove go1.16 build-tag
Remove the go1.16 build-tag, as go1.16 and before reached EOL. Some changes were needed in the generator code, as it would otherwise produce a new "tables.go" file instead of updating the versioned one. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 45d33be commit a7b35a8

File tree

4 files changed

+5
-14
lines changed

4 files changed

+5
-14
lines changed

cases/tables13.0.0.go

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cases/tables13.0.0_test.go

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/gen/code.go

+4-7
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,15 @@ func (w *CodeWriter) WriteGoFile(filename, pkg string) {
6464
// structures and writes it as a Go file to the given file with the given
6565
// package name and build tags for the current Unicode version,
6666
func (w *CodeWriter) WriteVersionedGoFile(filename, pkg string) {
67-
tags := buildTags()
68-
if tags != "" {
69-
pattern := fileToPattern(filename)
70-
updateBuildTags(pattern)
71-
filename = fmt.Sprintf(pattern, UnicodeVersion())
72-
}
67+
pattern := fileToPattern(filename)
68+
updateBuildTags(pattern)
69+
filename = fmt.Sprintf(pattern, UnicodeVersion())
7370
f, err := os.Create(filename)
7471
if err != nil {
7572
log.Fatalf("Could not create file %s: %v", filename, err)
7673
}
7774
defer f.Close()
78-
if _, err = w.WriteGo(f, pkg, tags); err != nil {
75+
if _, err = w.WriteGo(f, pkg, buildTags()); err != nil {
7976
log.Fatalf("Error writing file %s: %v", filename, err)
8077
}
8178
}

internal/gen/gen.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func CLDRVersion() string {
8383
}
8484

8585
var tags = []struct{ version, buildTags string }{
86-
{"13.0.0", "go1.16"},
86+
{"13.0.0", ""},
8787
}
8888

8989
// buildTags reports the build tags used for the current Unicode version.

0 commit comments

Comments
 (0)