Iris error

blov · · 551 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hi there, When I try to run iris framework helloworld sample, I got the following error: /home/andre/go/src/gopkg.in/kataras/iris.v5/configuration.go:577: c.Sessions.DecodeCookie undefined (type SessionsConfiguration has no field or method DecodeCookie) /home/andre/go/src/gopkg.in/kataras/iris.v5/configuration.go:625: unknown field &#39;DecodeCookie&#39; in struct literal of type SessionsConfiguration</p> <p>what is this? How to solve? Thanks</p> <hr/>**评论:**<br/><br/>shovelpost: <pre><p><a href="http://www.florinpatan.ro/2016/10/why-you-should-not-use-iris-for-your-go.html" rel="nofollow">Why you should not use iris.</a></p></pre>andre_borges: <pre><p>Great. Thank you. What you suggest?</p></pre>shovelpost: <pre><p>Start with net/http and the <a href="https://golang.org/doc/articles/wiki/" rel="nofollow">standard way</a>. You can get really, really far with zero dependencies.</p></pre>niosop: <pre><p>Like others have said, starting with net/http is a good idea. If you want to use a framework after that, there&#39;re a lot out there. <a href="https://echo.labstack.com/" rel="nofollow">https://echo.labstack.com/</a> worked well for a couple projects for me.</p></pre>robvdl: <pre><p>From my experience echo was once good, but not really so much now, it has too many external dependencies like depending on Google app engine stuff if you never intend to use Google app engine seems a bit much to me.</p> <p>What I am getting at is, you either use net/http directly OR add a thin wrapper on top like Chi which has 0 external dependencies... but echo, really has too many dependencies and there are better frameworks out now.</p> <p>Reasons why I personally prefer Chi:</p> <ul> <li>0 external dependencies</li> <li>makes use of Go 1.7+ context lib</li> <li>fast radix trie based router</li> <li>route groups and mounting sub routers is a nice feature</li> <li>method signatures follow the stdlib, so do middleware making it easy to integrate other libraries</li> </ul></pre>danilobuerger: <pre><p>Ugh, Iris.</p></pre>dlsniper: <pre><p>Open an issue on the tracker <a href="https://github.com/kataras/iris/issues/new" rel="nofollow">https://github.com/kataras/iris/issues/new</a> and the author will be happy to help <a href="http://i.imgur.com/wbIE00M.jpg" rel="nofollow">http://i.imgur.com/wbIE00M.jpg</a></p> <p>But jokes aside, I&#39;m sorry you bumped into that project, I can assure you that it&#39;s the not like that in the Go community. There are plenty of projects that can help you get started. From net/http to gobuffalo you can probably find what you need. However, if you are just starting with Go I highly recommend that you have a look first at net/http, and how it works, as that&#39;s the core library behind almost all other routers / frameworks in Go.</p> <p>You can also join Gophers Slack, <a href="https://invite.slack.golangbridge.org/" rel="nofollow">https://invite.slack.golangbridge.org/</a> , where a thriving community of gophers can help you with various issues.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

551 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传