Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use embedfile -trie to shrink size #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ module 4d63.com/tz

go 1.13

require 4d63.com/embedfiles v0.0.0-20190311033909-995e0740726f
require 4d63.com/embedfiles v1.0.0

replace 4d63.com/embedfiles v1.0.0 => github.com/tgulacsi/embedfiles v1.0.1-0.20200125145214-c937788601c4
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
4d63.com/embedfiles v0.0.0-20190311033909-995e0740726f h1:oyYjGRBNq1TxAIG8aHqtxlvqUfzdZf+MbcRb/oweNfY=
4d63.com/embedfiles v0.0.0-20190311033909-995e0740726f/go.mod h1:HxEsUxoVZyRxsZML/S6e2xAuieFMlGO0756ncWx1aXE=
4d63.com/embedfiles v1.0.0 h1:AR4j5WItSJwBX9SapkvmQUGLPlgCHQZaCDQ52zLXzZM=
4d63.com/embedfiles v1.0.0/go.mod h1:U0e+fedkrGPVJiU29PWZQ7pHHZRPiQAzwDJocZ4d3PE=
github.com/tgulacsi/embedfiles v1.0.1-0.20200125145214-c937788601c4 h1:ZGK46C2Dno1j/5jlQZa5wdNQm0IpAJK4FHXvo7BW1qw=
github.com/tgulacsi/embedfiles v1.0.1-0.20200125145214-c937788601c4/go.mod h1:U0e+fedkrGPVJiU29PWZQ7pHHZRPiQAzwDJocZ4d3PE=
2 changes: 1 addition & 1 deletion tz.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

//go:generate rm -fr zoneinfo
//go:generate unzip -q $GOROOT/lib/time/zoneinfo.zip -d zoneinfo/
//go:generate go run 4d63.com/embedfiles -out=zoneinfo.go -pkg=tz zoneinfo/
//go:generate go run 4d63.com/embedfiles -out=zoneinfo.go -pkg=tz -trie=true zoneinfo/

func tzData(name string) ([]byte, bool) {
data, ok := files["zoneinfo/"+name]
Expand Down
Loading