Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"gin mode unknown" error: show available mode #2567

Merged
merged 4 commits into from
Jan 11, 2021
Merged

"gin mode unknown" error: show available mode #2567

merged 4 commits into from
Jan 11, 2021

Conversation

codenoid
Copy link
Contributor

Before:

panic: gin mode unknown: development

goroutine 1 [running]:
github.com/gin-gonic/gin.SetMode(...)
	/home/flatearther/go/packages/pkg/mod/github.com/gin-gonic/gin@v1.6.3/mode.go:61
github.com/gin-gonic/gin.init.0()
	/home/flatearther/go/packages/pkg/mod/github.com/gin-gonic/gin@v1.6.3/mode.go:48 +0x16a
exit status 2

After:

panic: gin mode unknown: development (available mode: debug release test)

goroutine 1 [running]:
github.com/gin-gonic/gin.SetMode(...)
	/home/flatearther/go/packages/pkg/mod/github.com/gin-gonic/gin@v1.6.3/mode.go:61
github.com/gin-gonic/gin.init.0()
	/home/flatearther/go/packages/pkg/mod/github.com/gin-gonic/gin@v1.6.3/mode.go:48 +0x16a
exit status 2

@codenoid codenoid changed the title gin mode unknown: show available mode gin mode unknown error: show available mode Nov 26, 2020
@codenoid codenoid changed the title gin mode unknown error: show available mode "gin mode unknown" error: show available mode Nov 26, 2020
Copy link
Member

@thinkerou thinkerou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@thinkerou thinkerou added this to the 1.7 milestone Jan 4, 2021
@codecov
Copy link

codecov bot commented Jan 11, 2021

Codecov Report

Merging #2567 (b2e9734) into master (4d2dad5) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2567   +/-   ##
=======================================
  Coverage   98.49%   98.49%           
=======================================
  Files          41       41           
  Lines        1989     1989           
=======================================
  Hits         1959     1959           
  Misses         17       17           
  Partials       13       13           
Impacted Files Coverage Δ
mode.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4d2dad5...b2e9734. Read the comment docs.

@thinkerou thinkerou merged commit e753c50 into gin-gonic:master Jan 11, 2021
laojianzi added a commit to laojianzi/gin that referenced this pull request Jan 15, 2021
Co-authored-by: thinkerou <thinkerou@gmail.com>
Co-authored-by: J. J. Bigorra <josep@prowarehouse.nl>
Co-authored-by: Rubi <14269809+codenoid@users.noreply.github.com>
Co-authored-by: Qt <golang.chen@gmail.com>
Co-authored-by: Josep Jesus Bigorra Algaba <42377845+averageflow@users.noreply.github.com>
Co-authored-by: Snawoot <vladislav-ex-github@vm-0.com>
RK-GCP added a commit to RK-GCP/gin that referenced this pull request Mar 18, 2021
* Revert "Adding ppc64le architecture support on travis-ci (gin-gonic#2538)" (gin-gonic#2602)

* test: fixed the TestUnixSocket test on windows (gin-gonic#2595)

Co-authored-by: thinkerou <thinkerou@gmail.com>

* gin mode unknown: show available mode (gin-gonic#2567)

Co-authored-by: thinkerou <thinkerou@gmail.com>

* fix error gin support min Go version (gin-gonic#2584)

Co-authored-by: thinkerou <thinkerou@gmail.com>

* Fixes to the graceful shutdown example (gin-gonic#2552)

* Change error comparison to use errors.Is() and add a line of whitespace before the if statement on graceful shutdown

* Change from log.Fatalf to log.Printf to ensure the graceful shutdown actually works

Co-authored-by: J. J. Bigorra <josep@prowarehouse.nl>
Co-authored-by: thinkerou <thinkerou@gmail.com>

* basic auth: fix timing oracle (gin-gonic#2609)

Co-authored-by: thinkerou <thinkerou@gmail.com>

* chore: Deleted spaces (gin-gonic#2622)

* Remove the tedious named return value (gin-gonic#2620)

Co-authored-by: thinkerou <thinkerou@gmail.com>

Co-authored-by: thinkerou <thinkerou@gmail.com>
Co-authored-by: Jeff <laojianzi1994@gmail.com>
Co-authored-by: Rubi <14269809+codenoid@users.noreply.github.com>
Co-authored-by: Qt <golang.chen@gmail.com>
Co-authored-by: Josep Jesus Bigorra Algaba <42377845+averageflow@users.noreply.github.com>
Co-authored-by: J. J. Bigorra <josep@prowarehouse.nl>
Co-authored-by: Snawoot <vladislav-ex-github@vm-0.com>
Co-authored-by: Alexander Melentyev <55826637+alexander-melentyev@users.noreply.github.com>
Co-authored-by: Andy Pan <panjf2000@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants