mirror of
https://github.com/kataras/iris.git
synced 2025-12-23 12:57:05 +00:00
Nothing special, some linting
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
<a href="https://travis-ci.org/kataras/iris"><img src="https://img.shields.io/travis/kataras/iris.svg?style=flat-square" alt="Build Status"></a>
|
||||
|
||||
<a href="https://github.com/avelino/awesome-go"><img src="https://img.shields.io/badge/awesome-%E2%9C%93-ff69b4.svg?style=flat-square" alt="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg"></a>
|
||||
<a href="http://goreportcard.com/report/kataras/iris"><img src="https://img.shields.io/badge/report%20card%20-A%2B-F44336.svg?style=flat-square" alt="http://goreportcard.com/report/kataras/iris"></a>
|
||||
|
||||
<a href="#"><img src="https://img.shields.io/badge/platform-Any-ec2eb4.svg?style=flat-square" alt="Platforms"></a>
|
||||
|
||||
@@ -39,7 +39,7 @@ Ideally suited for both experienced and novice <b>Developers</b>.
|
||||
|
||||
## Recent Articles
|
||||
|
||||
- [Building Web Apps with Iris](http://mycodesmells.com/post/building-web-apps-with-iris) by Paweł Słomka
|
||||
- [Building Web Apps with Iris](http://mycodesmells.com/post/building-web-apps-with-iris) by Paweł Słomka
|
||||
|
||||
- [The fastest web framework for Go](http://marcoscleison.xyz/the-fastest-web-framework-for-go-in-this-earth/) by Marcos Cleison
|
||||
|
||||
@@ -920,5 +920,3 @@ This project is licensed under the [Apache License, Version 2.0](LICENSE), Copyr
|
||||
[Language Widget]: https://img.shields.io/badge/powered_by-Go-3362c2.svg?style=flat-square
|
||||
[Language]: http://golang.org
|
||||
[Platform Widget]: https://img.shields.io/badge/platform-Any--OS-gray.svg?style=flat-square
|
||||
[Awesome]: https://github.com/avelino/awesome-go
|
||||
[Awesome Widget]: https://img.shields.io/badge/awesome%20go-%E2%9C%93-ff69b4.svg?style=flat-square
|
||||
|
||||
@@ -352,7 +352,7 @@ func (ctx *Context) PostValuesAll() (valuesAll map[string][]string) {
|
||||
|
||||
// PostValues returns the post data values as []string of a single key/name
|
||||
func (ctx *Context) PostValues(name string) []string {
|
||||
values := make([]string, 0)
|
||||
var values []string
|
||||
if v := ctx.PostValuesAll(); v != nil && len(v) > 0 {
|
||||
values = v[name]
|
||||
}
|
||||
|
||||
15
plugin.go
15
plugin.go
@@ -282,15 +282,16 @@ func (p *pluginContainer) Add(plugins ...Plugin) error {
|
||||
// Activate the plugin, if no error then add it to the plugins
|
||||
if pluginObj, ok := plugin.(pluginActivate); ok {
|
||||
|
||||
tempPluginContainer := *p // contains the mutex but we' re safe here.
|
||||
err := pluginObj.Activate(&tempPluginContainer)
|
||||
//tempPluginContainer := *p // contains the mutex but we' re safe here.
|
||||
err := pluginObj.Activate(p)
|
||||
if err != nil {
|
||||
return errPluginActivate.Format(pName, err.Error())
|
||||
}
|
||||
tempActivatedPluginsLen := len(tempPluginContainer.activatedPlugins)
|
||||
if tempActivatedPluginsLen != len(p.activatedPlugins)+tempActivatedPluginsLen+1 { // see test: plugin_test.go TestPluginActivate && TestPluginActivationError
|
||||
p.activatedPlugins = tempPluginContainer.activatedPlugins
|
||||
}
|
||||
/*
|
||||
tempActivatedPluginsLen := len(tempPluginContainer.activatedPlugins)
|
||||
if tempActivatedPluginsLen != len(p.activatedPlugins)+tempActivatedPluginsLen+1 { // see test: plugin_test.go TestPluginActivate && TestPluginActivationError
|
||||
p.activatedPlugins = tempPluginContainer.activatedPlugins
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
@@ -392,7 +393,7 @@ func (p *pluginContainer) Printf(format string, a ...interface{}) {
|
||||
func (p *pluginContainer) fire(name string) int {
|
||||
p.mu.Lock()
|
||||
var times int
|
||||
// maybe unnessecary but for clarity reasons
|
||||
// maybe unnecessary but for clarity reasons
|
||||
if t, found := p.fired[name]; found {
|
||||
times = t
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user