Remove the init panic #1
No reviewers
Labels
No Label
kind/breaking
kind/bug
kind/deployment
kind/docs
kind/enhancement
kind/feature
kind/lint
kind/proposal
kind/question
kind/security
kind/testing
kind/translation
kind/ui
lgtm/done
lgtm/need
lgtm/need
priority/critical
priority/low
priority/maybe
priority/medium
refactor
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
status/blocked
status/needs-feedback
status/wip
No Milestone
No Assignees
4 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: macaron/macaron#1
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "remove-init-panic"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original from: https://github.com/go-macaron/macaron/pull/178
cc: @zeripath
We need CI at first.
Please rebase.
done
We could actually get rid of the whole init block and require that anyone who needs Root set just sets it themselves.
AFAICS we don't even use Root in Gitea.
@zeripath ok. updated with removed init func.
So the other thing that init did was set whether macaron is in dev mode or not.
Not sure what people feel about removing that - we do advertise it on the website.
It's not hard to just set it ourselves though. Just need to remember that we need it.
@techknowlogick did you check that removing this initialisation doesn't break stuff? Or just take my word for it?
@zeripath 100% took your word for it. I've set this as blocked as you are right I should check to make sure it doesn't break things.
I think maybe I'll put env var back in because it might be helpful for development if someone wants to re-compile templates each request (someone who isn't be because I just restart binary each time 😆 )
I've just restored the
SetENV(...)
call and pushed this up.I think we could now merge this.
I've also updated the unknwon links.
@ -312,4 +311,1 @@
setENV(os.Getenv("MACARON_ENV"))
var err error
Root, err = os.Getwd()
@techknowlogick why didn't add you
Root, GetwdErr = os.Getwd()
as in https://github.com/go-macaron/macaron/pull/178?Because we don't use macaron.Root so the code is unnecessary
just thinking of not to derive to far from original ... so we are able to port PR from and to our fork ...