mirror of
https://github.com/kataras/iris.git
synced 2025-12-23 21:07:03 +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://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>
|
<a href="#"><img src="https://img.shields.io/badge/platform-Any-ec2eb4.svg?style=flat-square" alt="Platforms"></a>
|
||||||
|
|
||||||
@@ -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 Widget]: https://img.shields.io/badge/powered_by-Go-3362c2.svg?style=flat-square
|
||||||
[Language]: http://golang.org
|
[Language]: http://golang.org
|
||||||
[Platform Widget]: https://img.shields.io/badge/platform-Any--OS-gray.svg?style=flat-square
|
[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
|
// PostValues returns the post data values as []string of a single key/name
|
||||||
func (ctx *Context) PostValues(name string) []string {
|
func (ctx *Context) PostValues(name string) []string {
|
||||||
values := make([]string, 0)
|
var values []string
|
||||||
if v := ctx.PostValuesAll(); v != nil && len(v) > 0 {
|
if v := ctx.PostValuesAll(); v != nil && len(v) > 0 {
|
||||||
values = v[name]
|
values = v[name]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -282,15 +282,16 @@ func (p *pluginContainer) Add(plugins ...Plugin) error {
|
|||||||
// Activate the plugin, if no error then add it to the plugins
|
// Activate the plugin, if no error then add it to the plugins
|
||||||
if pluginObj, ok := plugin.(pluginActivate); ok {
|
if pluginObj, ok := plugin.(pluginActivate); ok {
|
||||||
|
|
||||||
tempPluginContainer := *p // contains the mutex but we' re safe here.
|
//tempPluginContainer := *p // contains the mutex but we' re safe here.
|
||||||
err := pluginObj.Activate(&tempPluginContainer)
|
err := pluginObj.Activate(p)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errPluginActivate.Format(pName, err.Error())
|
return errPluginActivate.Format(pName, err.Error())
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
tempActivatedPluginsLen := len(tempPluginContainer.activatedPlugins)
|
tempActivatedPluginsLen := len(tempPluginContainer.activatedPlugins)
|
||||||
if tempActivatedPluginsLen != len(p.activatedPlugins)+tempActivatedPluginsLen+1 { // see test: plugin_test.go TestPluginActivate && TestPluginActivationError
|
if tempActivatedPluginsLen != len(p.activatedPlugins)+tempActivatedPluginsLen+1 { // see test: plugin_test.go TestPluginActivate && TestPluginActivationError
|
||||||
p.activatedPlugins = tempPluginContainer.activatedPlugins
|
p.activatedPlugins = tempPluginContainer.activatedPlugins
|
||||||
}
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -392,7 +393,7 @@ func (p *pluginContainer) Printf(format string, a ...interface{}) {
|
|||||||
func (p *pluginContainer) fire(name string) int {
|
func (p *pluginContainer) fire(name string) int {
|
||||||
p.mu.Lock()
|
p.mu.Lock()
|
||||||
var times int
|
var times int
|
||||||
// maybe unnessecary but for clarity reasons
|
// maybe unnecessary but for clarity reasons
|
||||||
if t, found := p.fired[name]; found {
|
if t, found := p.fired[name]; found {
|
||||||
times = t
|
times = t
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user