Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 16:28

    kataras on master

    update example for validator v1… (compare)

  • 16:24

    kataras on master

    add Context.SetSameSite(integra… (compare)

  • Apr 03 19:13

    kataras on master

    HISTORY.md additions (compare)

  • Mar 24 00:13

    kataras on master

    fix https://github.com/kataras/… (compare)

  • Mar 23 23:03

    kataras on v12

    fix bug: abount dependency inje… Merge pull request #1475 from r… (compare)

  • Mar 23 23:03
    kataras closed #1475
  • Mar 23 08:33
    rocinantex review_requested #1475
  • Mar 23 08:33
    rocinantex opened #1475
  • Mar 23 00:18

    kataras on master

    fix .dokerignore to .dockerigno… Merge pull request #1471 from l… (compare)

  • Mar 23 00:18
    kataras closed #1471
  • Mar 23 00:17

    kataras on master

    fix bug: abount dependency inje… Merge pull request #1474 from r… (compare)

  • Mar 23 00:17
    kataras closed #1474
  • Mar 22 01:07
    rocinantex review_requested #1474
  • Mar 22 01:07
    rocinantex opened #1474
  • Mar 19 08:15
    liguoqinjim review_requested #1471
  • Mar 19 08:15
    liguoqinjim opened #1471
  • Mar 17 07:56
    rocinantex closed #1469
  • Mar 17 02:58
    liguoqinjim closed #1470
  • Mar 16 08:46
    liguoqinjim review_requested #1470
  • Mar 16 08:46
    liguoqinjim opened #1470
vgocoder
@vgocoder
    app := iris.New()

    r, close := newRequestLogger()
    defer close()

    app.Use(r)

    app.OnAnyErrorCode(r, func(ctx iris.Context) {
        ctx.Values().Set("error_log", "error")
        ctx.JSON(http.ApiFailedResponse(ctx.GetStatusCode(), "error", nil))
    })
vgocoder
@vgocoder
@kataras I use toml file at last . ^V^
@kataras I'm back haha
Fei Song
@songfei
@kataras thank you!!
Gerasimos (Makis) Maropoulos
@kataras
Hello @vgocoder welcome once again! You can get it by ctx.GetBody() and run with iris.Run(..., iris.WithoutBodyConsumptionOnUnmarshal) if you want to re-use the response body later on in the same request-response lifecycle (handler chain). GetBody: doc and GetBody: example.
Gilad Sharaby
@giladsh1
Hello
I was wondering if there's a way to set the log level for requests via an environment variable or some other type of configuration.
with the default setting, every GET request is automatically written to stdout, which slows the application down and create a lot of unnecessary noise.
many thanks!
Gerasimos (Makis) Maropoulos
@kataras

Hello @giladsh1,

This is happening because you initialized the Iris application with app := iris.Default(), which registers the request logger middleware and recover, use app := iris.New() instead and customize the request logger (if you need to log the requests) as you want. You can change the log output and customize each log message through logger's Handle method.

Resources:

Gilad Sharaby
@giladsh1
Thanks a lot @kataras!
vgocoder
@vgocoder
@kataras Ths
Phongthorn Khamkankaew
@ALTELMA
Anyone here
Hello
I got this error from a new version of iris v12
Error scanning github.com/kataras/iris/12: cannot find package "." in:
/root/.glide/cache/src/https-github.com-kataras-iris/12
[ERROR] Error scanning github.com/kataras/iris/v12/mvc: cannot find package "." in:
/root/.glide/cache/src/https-github.com-kataras-iris/v12/mvc
[ERROR] Failed to retrieve a list of dependencies: Error resolving imports
FYI, I use glide to get the package.
bscutvick
@bscutvick
hello, can anyone help with this error:
cannot use crs (type "github.com/kataras/iris/v12/context".Handler) as type "github.com/kataras/iris/context".Handler in argument to api.APIBuilder.Party
i've tried a bunch of different updating already
bscutvick
@bscutvick
looks like adding /v12 to all the import statements needs to happen, at least I think so
Phongthorn Khamkankaew
@ALTELMA
I try with a new project from scraht
And put /12 it work for installation step, but not works on the development.
Go always throw an error cannot find any package from iris/v12
Gerasimos (Makis) Maropoulos
@kataras
@bscutvick That's it.
@ALTELMA I think you opened an issue about this and it was resolved by using go1.13 and github.com/kataras/iris/v12 to all import paths of your project, right?
Gilad Sharaby
@giladsh1
Hello,
I'm using iris for multiple micro services in dev and stage at the moment, and we want to stress test our apps before going live in production.
Are there any special configuration or consideration we need to take with iris that someone can share from experience?
Any help will be appreciated!
Pavel Nemirovsky
@pavelnemirovsky
Hi Guys, we keep using Iris 10.1.7 and i noticed recently that following dependency no longer exists
[[projects]]
branch = "v2"
name = "github.com/kataras/survey"
packages = [".","terminal","core"]
revision = "00934ae069eda15df26fa427ac393e67e239380c"
can u please advise about ?
Gerasimos (Makis) Maropoulos
@kataras
Hello @pavelnemirovsky I am highly recommend you to upgrade to the latest Iris v12 which is a valid go module and will not require go dep from you. To fix your issue edit your Gopkg.yml -> kataras/survey -> revision to: cc93dc0b22fd116afc9217ac3c623f152fabfa83 and branch to: master.
Pavel Nemirovsky
@pavelnemirovsky
Thank you, I tried to do it on my project level it didn’t work out, so far I upgraded to 11.1 and use go module across the board. Can u recommend most stable version which is production ready?
umairalii
@umairalii
hi!
Gerasimos (Makis) Maropoulos
@kataras

@pavelnemirovsky Hello Pavel, I am sorry for your issues. I am willing to personally help you. The breaking changes between 11.1 and v12.x are not extremely difficult to resolve, could you please send me a PM (gitter) about the problems you faced over them or even better share a private/public github repository so I can resolve all your issues myself?

Thanks

Hello @umairalii welcome to our community!
Pavel Nemirovsky
@pavelnemirovsky
@kataras thank you so much we use 11.1 for now and seems things are working fine, thank you
PAUL
@paulzhang5511
iris-cli run fork/exec /bin/sh: operation not permitted
Windows10 sub sytem
@kataras
Gerasimos (Makis) Maropoulos
@kataras
@paulzhang5511 wow, iris-cli is not ready yet but thanks for your bug report, it's fixed at: https://github.com/kataras/iris-cli/issues/1#issuecomment-574890472 you can update and verify it
@pavelnemirovsky You are welcome, send me if you need further assistance in the future, also is it possible to share the company/startup name with me?
Pavel Nemirovsky
@pavelnemirovsky
@kataras - i am from cedato.com, @kataras can u recommend most stable version ?
Pavel Nemirovsky
@pavelnemirovsky
hi
@kataras can u please advise
minhvh93
@minhvh93
@kataras I like iris.
Gerasimos (Makis) Maropoulos
@kataras
@pavelnemirovsky Iris version 12.1.6 just released, grab this we have zero reported bugs so far.
Thanks @minhvh93, if you ever need help for Iris just write here or open an issue on our github repository!
huatan
@huatan
is there anu chinese man?
i issue a question about "the Chinese characters were garbled in the file name " in github ,can anyone help ?
Pavel Nemirovsky
@pavelnemirovsky
@kataras thank you very much
Gerasimos (Makis) Maropoulos
@kataras
Hello @huatan, I didn't get it, I am not Chinese but where do you get this? in Iris?
You are welcome @pavelnemirovsky, if you need any assistance let me help in the process!
huatan
@huatan
@kataras i close the issue,i find use "golang.org/x/text/encoding/simplifiedchinese" this package can solve "the gb2312 to utf8 question"