by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jul 07 12:41

    kataras on master

    HandleDir: add Attachments opti… (compare)

  • Jul 07 03:13

    kataras on master

    HandleDir: customize file/dir l… (compare)

  • Jul 06 18:41

    kataras on master

    Update jet parser to v4.0.0 as … (compare)

  • Jul 06 16:09

    kataras on master

    fix #1552 (compare)

  • Jul 06 13:08

    kataras on master

    file-server example: use a cust… (compare)

  • Jul 05 20:42

    kataras on master

    HISTORY.md updates (compare)

  • Jul 05 20:37

    kataras on master

    minor (compare)

  • Jul 05 20:28

    kataras on master

    add a DirListRich helper to mak… (compare)

  • Jul 05 12:13

    kataras on master

    file-server example: add upload… (compare)

  • Jul 05 02:41

    kataras on master

    file-server: fix ShowList on ro… (compare)

  • Jul 03 10:52

    kataras on master

    change personal tw follow btn t… (compare)

  • Jul 03 10:50

    kataras on master

    minor (compare)

  • Jul 02 17:57

    kataras on master

    add an example (and a test case… (compare)

  • Jul 01 11:44

    kataras on master

    update stream example (compare)

  • Jun 29 18:06

    kataras on master

    use Request().Context().Done() … (compare)

  • Jun 28 20:10

    kataras on master

    minor (compare)

  • Jun 28 20:06

    kataras on master

    add Context.ReadJSONProtobuf me… (compare)

  • Jun 27 11:00

    kataras on master

    add cluster driver fix PR: https://github.com/kata… remove example and 2 more (compare)

  • Jun 27 11:00
    kataras closed #1546
  • Jun 27 10:59
    kataras synchronize #1546
huatan
@huatan
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"
Hamid Reza Hassni Yaqoti
@H4midR
Hi every Body
Hi Dear Kataras
Thanks for your friendly response. I'm here as you wish.
so what's next?
should we arrange a time for checking codes or not?
@kataras
Gerasimos (Makis) Maropoulos
@kataras
Hi @H4midR, welcome, I've just sent you a PM
Gerasimos (Makis) Maropoulos
@kataras
to arrange a time
snowlyg
@snowlyg
i want to use iris with qor admin,but i don't has any idea. @kataras
snowlyg
@snowlyg
@kataras I have a idea now, thank you.
Gerasimos (Makis) Maropoulos
@kataras
Hello @snowlyg here you are:
package main

import (
    "github.com/kataras/iris/v12"
    "github.com/qor/admin"
)

func main() {
    app := iris.New()

    qorPrefix := "/admin"
    // create a new qor admin instance.
    q := admin.New(&admin.AdminConfig{DB: yourDB})
    // create a qor handler and convert it to an iris one with `iris.FromStd`.
    handler := iris.FromStd(q.NewServeMux(qorPrefix))
    // register routes for "/admin" and "/admin/:xxx/..."
    app.Any(qorPrefix, handler)
    app.Any(qorPrefix+"/{p:path}", handler)

    // start the server.
    app.Listen(":8080")
}
Blue Dog
@bluedogtwo
Where can I find information about the tmpl funcs: part, current, url, urlpath, yield, render_r and render? I have read the example under wiki/view but the information is scarce.
pmls63
@pmls63
@kataras how can i use iris work with go-micro , thanks
Gerasimos (Makis) Maropoulos
@kataras
Hello @bluedogtwo sorry for the delay, it depends on the View Engine you use, for HTML there are the followings: https://github.com/kataras/iris/blob/b6ac39480bc98eab1d7f9dbe8ecb53be9851e848/view/html.go#L397-L441
Gerasimos (Makis) Maropoulos
@kataras
Hello @pmls63, the Iris application is a valid http.Handler, you just have to run app.Build() in order to build the router instead of app.Listen/app.Run. Here is a code snippet on how to use iris + go-micro:
package main

import "github.com/micro/go-micro/web"
import "github.com/kataras/iris/v12"

// [...]

app := iris.New()
// [app.Handle/Get/Post...]
app.Build() // <--- HERE


service := web.NewService(web.Name("go.micro.api.name"))
service.Init()

service.Handle("/", app) // <--- HERE
service.Run()

// Other services...
pmls63
@pmls63
thanks a lot, that's what i want
sourav kumar
@SouravKumarPandit
Can you suggest me bolg or book on iris http3 network call
laowalter
@laowalter
Hi all, I have a closure function, need to initialize with c1 := model.NextPhoto() first, then it will be called like c1(), I would like to run c1() every time by request for post method, but how can I initialize c1 := model.NextPhoto() only once, before post method is ready for request, and then can resoponse by c1() for later request? Thanks for any advice.
Gerasimos (Makis) Maropoulos
@kataras
Any http3 client will work.
Hello @laowalter, you can create a function that returns an iris.Handler, initialize your dependencies in the top function and use them inside the return func(iris.Context)
laowalter
@laowalter
@kataras Many thanks, will try!
Gerasimos (Makis) Maropoulos
@kataras
You are welcome @laowalter, It should look like this:
func handleRoute() iris.Handler {
    c1 := model.NextPhoto()

    return func(ctx iris.Context) {
        c1()
   }
}
app := iris.New()
app.Get("/", handleRoute())
UniónMexicanaDelNorte
@UnionMexicanaDelNorte

Hello!

Any example of chatrooms with golang-iris?

laowalter
@laowalter
@kataras Great! I am looking for this! thanks.
Gerasimos (Makis) Maropoulos
@kataras
Hello @UnionMexicanaDelNorte, yes there is an example of that(neffos, bootstrap, docker) served by net/http at: https://github.com/neffos-contrib/bootstrap-chat , you can easily converted to Iris, take a look at: https://github.com/kataras/iris/tree/v12/_examples/websocket
@laowalter You are welcome, send if you need more
Guillermo Abneed
@Abneed
Good morning!
Excuse me, is there an example in how to integrate neffos.js library with an Angular project, with Observers and Observables?
Gerasimos (Makis) Maropoulos
@kataras
Hello @Abneed, I have almost 4 years to code anything with Angular js. I'll try to implement something for you when I find time, if you have something that I can work in (e.g. a starter kit that you work on) please send it over
basicfu
@basicfu
hello,How to delete the routing?
Vishwas Jagetiya
@vishwas_jagetiy_twitter
Hello
I am facing issues migrating my exisiting websocket code from iris-contrib to kataras/iris/v12/websocket.. please let me know if you can help on that
Guillermo Abneed
@Abneed
Can you share us the error message? @vishwas_jagetiy_twitter
Sujit Prasad Baniya
@itsursujit
Hello,
package main

import (
    "github.com/kataras/iris/v12"
    "iris/app/Http/Controllers"
)

func newApp() *iris.Application {
    app := iris.New()
    app.HandleDir("/assets", "./public/assets")

    return app
}


func main() {
    app := newApp()

    // app.Favicon("./static/favicons/favicon.\\.ico", "/favicon_16_16.ico")
    // This will serve the ./static/favicons/favicon.ico to: localhost:8080/favicon_16_16.ico

    app.Get("/", Controllers.Index)
    app.Get("/landing", Controllers.Landing) // if favicon doesn't show to you, try to clear your browser's cache.
    _ = app.Listen(":8080")
}
This piece of code is not embedding the assets with binary file
Anything wrong I'm doing?
Sujit Prasad Baniya
@itsursujit
How can I integrate pkger?
Enjoy
@mcoo
How to make a 301 redirect which let http => https?
Sujit Prasad Baniya
@itsursujit
Any support on above question?
Gerasimos (Makis) Maropoulos
@kataras

I am facing issues migrating my exisiting websocket code from iris-contrib to kataras/iris/v12/websocket.. please let me know if you can help on that

Hello, yes I've just saw your message, will get back to you soon!

How can I integrate pkger?

Hello, what do you mean? You don't need any special function to integrate it, use it as you use with net/http, instead of w.Write just use ctx.Write.

Excuse me, is there an example in how to integrate neffos.js library with an Angular project, with Observers and Observables?

Hello and sorry for the late response, you are the second person asking for that. The last time I wrote angular was 4 years ago. I don't have the necessary skills to provide you a decent answer. It shouldn't be so hard though. You can read the neffos typescript client code through: kataras/neffos.js. I can add you in the neffos-contrib organisation if you are planning on releasing a library which provides such implementations for neffos. If you don't have the necessary experience, I will find time to do it in my own, (after June) and notify you.

Enjoy
@mcoo
@kataras But when I can not use 80, I want to redirect. For example I get http://xxxxx.com:1234 I want to redirect to https://xxxxxx.com:1234
Enjoy
@mcoo
Ok i know func before(ctx iris.Context) {
if !strings.Contains(ctx.FullRequestURI(),"https") {
ctx.Redirect(strings.ReplaceAll(ctx.FullRequestURI(),"http","https"),302)
return
}
Bharath B
@BharathB23
Hello @kataras,
As of now current active version is v12.1.8, could you please let me know about the upcoming release, tentative timeline, when new version will be available.
IdeaOutline
@IdeaOutline
What hosting companies are available that support Iris?
I will also be using CouchDB and Svelte/Sapper.
Le Minh Duc
@duclm2609
I'm following document of dependency injection, but there is no method: ConfigureContainer from iris v12. I even check the sourcecode. Did the feature removed?