-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Description
Compare the two:
The following compiles to 6.6MB w/ go1.22.5 on osx (arm64)
package main
import (
"github.com/magiconair/properties"
)
func main() {
_, err := properties.LoadFile("./config.properties", properties.UTF8)
if err != nil {
panic(err)
}
}The following compiles to 3.7MB:
package main
import (
"github.com/magiconair/properties"
)
func main() {
loader := &properties.Loader{Encoding: properties.UTF8}
_, err := loader.LoadFile("./config.properties")
if err != nil {
panic(err)
}
}The reason for this is because properties.LoadFile funnels through Loader.LoadAll, which can load properties files from URLs, so net/http and everything gets pulled in.
Metadata
Metadata
Assignees
Labels
No labels