diff options
| author | Shulhan <ms@kilabit.info> | 2021-10-27 22:01:43 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-10-27 22:01:43 +0700 |
| commit | 0bfe10781a53474fba2ab2b3f933df6b7e0a4e70 (patch) | |
| tree | f929439ebaa4c1b58bac05925f21e693a20ab8e6 /ciigo.go | |
| parent | 36d729c71dd03303a2eef4cfefa64ac1a78a0ec1 (diff) | |
| download | ciigo-0bfe10781a53474fba2ab2b3f933df6b7e0a4e70.tar.xz | |
all: update to latest share module
The latest share module simplify the memfs.GoEmbed call by using
struct memfs.EmbedOptions instead of passing it as parameters.
The changes on share module affect on how EmbedOptions in this module,
where memfs.EmbedOptions is used to replace field PackageName, VarName,
and GoFileName.
Diffstat (limited to 'ciigo.go')
| -rw-r--r-- | ciigo.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -117,7 +117,10 @@ func GoEmbed(opts *EmbedOptions) (err error) { memfsOpts := &memfs.Options{ Root: opts.Root, Excludes: defExcludes, + Embed: opts.EmbedOptions, } + memfsOpts.Embed.ContentEncoding = memfs.EncodingGzip + mfs, err = memfs.New(memfsOpts) if err != nil { return fmt.Errorf("%s: %w", logp, err) @@ -130,7 +133,7 @@ func GoEmbed(opts *EmbedOptions) (err error) { } } - err = mfs.GoEmbed(opts.PackageName, opts.VarName, opts.GoFileName, memfs.EncodingGzip) + err = mfs.GoEmbed() if err != nil { return fmt.Errorf("%s: %w", logp, err) } |
