Remove the init panic #1

Merged
techknowlogick merged 7 commits from remove-init-panic into master 2020-01-05 02:31:45 +00:00
Contributor
Original from: https://github.com/go-macaron/macaron/pull/178 cc: @zeripath
Contributor

We need CI at first.

We need CI at first.
Contributor

Please rebase.

Please rebase.
Author
Contributor

done

done
Contributor

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.

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.
Author
Contributor

@zeripath ok. updated with removed init func.

@zeripath ok. updated with removed init func.
Contributor

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?

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?
techknowlogick added the
status/blocked
label 2019-07-31 23:17:40 +00:00
Author
Contributor

@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 😆 )

@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 :laughing: )
Contributor

I've just restored the SetENV(...) call and pushed this up.

I think we could now merge this.

I've just restored the `SetENV(...)` call and pushed this up. I think we could now merge this.
zeripath approved these changes 2020-01-04 21:04:11 +00:00
Dismissed
Contributor

I've also updated the unknwon links.

I've also updated the unknwon links.
6543 reviewed 2020-01-04 21:44:24 +00:00
Dismissed
@ -312,4 +311,1 @@
setENV(os.Getenv("MACARON_ENV"))
var err error
Root, err = os.Getwd()
First-time contributor

@techknowlogick why didn't add you Root, GetwdErr = os.Getwd() as in https://github.com/go-macaron/macaron/pull/178?

@techknowlogick why didn't add you `Root, GetwdErr = os.Getwd()` as in https://github.com/go-macaron/macaron/pull/178?
Contributor

Because we don't use macaron.Root so the code is unnecessary

Because we don't use macaron.Root so the code is unnecessary
First-time contributor

just thinking of not to derive to far from original ... so we are able to port PR from and to our fork ...

just thinking of not to derive to far from original ... so we are able to port PR from and to our fork ...
6543 approved these changes 2020-01-04 22:30:02 +00:00
Dismissed
techknowlogick removed the
status/blocked
label 2020-01-05 02:31:25 +00:00
techknowlogick closed this pull request 2020-01-05 02:31:45 +00:00
techknowlogick deleted branch remove-init-panic 2020-01-05 02:31:54 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.