files icon indicating copy to clipboard operation
files copied to clipboard

Consider using the standard library "embed"

Open zxysilent opened this issue 4 years ago • 7 comments

Consider using the standard library embed

It uses raw data and can reduce the size of the executable program compared with the current way

zxysilent avatar Feb 23 '21 08:02 zxysilent

I agree!!! Good idea

mirecl avatar Feb 24 '21 09:02 mirecl

Have you taken into consideration this will introduce beaking dependency for everyone using the go version before go1.16? I don't see if this is going to be approved before go.17 is release.

ubogdan avatar Feb 27 '21 11:02 ubogdan

FYI, it looks like this work never go merged in. For those interested, I did write a drop-in replacement w/ go:embed and fs.FS, but it is incompatible with earlier versions of Go.

https://github.com/tylfin/gin-swagger-files

tylfin avatar Jul 13 '21 18:07 tylfin

Have you taken into consideration this will introduce beaking dependency for everyone using the go version before go1.16? I don't see if this is going to be approved before go.17 is release.

Currently it's possible to lock dependency version using go modules, for those that wants compatibility before go1.16, they can use the library with previous tags and versions

Jictyvoo avatar Feb 03 '23 00:02 Jictyvoo

It has any plans to merge this feature soon?

Jictyvoo avatar Feb 03 '23 00:02 Jictyvoo

As #16 was merged, should this be closed?

Jictyvoo avatar Mar 28 '23 00:03 Jictyvoo

I belive yes

ubogdan avatar Mar 28 '23 06:03 ubogdan