go-sprout / sprout

From sprig to sprout - Useful template functions for Go templates with steroids
https://sprout.atom.codes
MIT License
86 stars 4 forks source link

proposal: Re-add sprout.FuncMap #49

Open andig opened 4 weeks ago

andig commented 4 weeks ago

You have a proposal, explain it!

0.5 adds a breaking change by removing/replacing sprout.FuncMap

Describe the solution you'd like

It doesn't seem necessary to do so. Instead of forcing devs to update packages, sprout.FuncMap could remain providing the same functionality as before.

Additional context

I don't care for template performance at all ;)

Code of Conduct

42atomys commented 4 weeks ago

Hello @andig,

Due to the way Go modules are structured, it's not possible to mix "all-in-one package" builds with "per package" builds. The "all-in-one" build method imports all dependencies simultaneously, which can lead to dependency management issues. These issues are typically addressed by using a registry system, which handles dependencies more efficiently and avoids potential conflicts.

To help developers transition smoothly without needing to adopt the new system immediately, a sprigin package has been made available and is explained in detail here: Transitioning from Sprig.

P.S. For your project, evcc, I have forked the project to implement the update. The PR will be available today or tomorrow. :)

andig commented 3 weeks ago

Upgrade is done ;)