27 }
28 buff := []byte(URLPattern)
29 for k, v := range r.Params {
30 key := []byte{}31 key = append(key, "{{."...)
32 key = append(key, k...)
33 key = append(key, "}}"...)
116}
117
118func load(ctx context.Context, plugins []string, rmf RegisterModifierFunc, logger logging.Logger) (int, error) {
119 errors := []error{}120 loadedPlugins := 0
121 for k, pluginName := range plugins {
122 if err := open(ctx, pluginName, rmf, logger); err != nil {
52}
53
54func load(plugins []string, rcf RegisterHandlerFunc, logger logging.Logger) (int, error) {
55 errors := []error{} 56 loadedPlugins := 0
57 for k, pluginName := range plugins {
58 if err := open(pluginName, rcf, logger); err != nil {
52}
53
54func load(plugins []string, rcf RegisterClientFunc, logger logging.Logger) (int, error) {
55 errors := []error{} 56 loadedPlugins := 0
57 for k, pluginName := range plugins {
58 if err := open(pluginName, rcf, logger); err != nil {
43 engine.HandleMethodNotAllowed = true
44 engine.ContextWithFallback = true
45
46 paths := []string{} 47
48 ginOptions := engineConfiguration{}
49 if v, ok := cfg.ExtraConfig[Namespace]; ok {
An empty slice can be represented by nil
or an empty slice literal. They are
functionally equivalent — their len
and cap
are both zero — but the nil
slice is the preferred style. For more information about empty slices,
see Declaring Empty Slices.
package main
func foo() {
a := []int{}
}
package main
func foo() {
var a []int
}