summaryrefslogtreecommitdiffstats
path: root/plugin/example_hello_world_test.go
diff options
context:
space:
mode:
authorJesse Hallam <jesse.hallam@gmail.com>2018-10-03 13:13:19 -0400
committerGitHub <noreply@github.com>2018-10-03 13:13:19 -0400
commit580b546862860ca389305d0d4614471095ec67fe (patch)
tree0af3d83f4c5a44f5c7b4d9379238afb7c1573330 /plugin/example_hello_world_test.go
parentb6835ab984aece679cb0d6bea548d3f2ed1c9af2 (diff)
downloadchat-580b546862860ca389305d0d4614471095ec67fe.tar.gz
chat-580b546862860ca389305d0d4614471095ec67fe.tar.bz2
chat-580b546862860ca389305d0d4614471095ec67fe.zip
MM-12193: remove auto unmarshalling (#9519)
* MM-12193: remove auto configuration unmarshalling Since plugin hook events are called concurrently, there's no way for the plugin framework to coordinate safe access to the automatically unmarshalled configuration fields. Remove this functionality, and update documentation to illustrate a safe way to do this. * better Fprint example * fix unit tests * log when OnConfigurationChange fails through OnActivate * clarify lifecycle when OnConfigurationChange returns an error * call SetAPI even if OnConfigurationChange not implemented
Diffstat (limited to 'plugin/example_hello_world_test.go')
-rw-r--r--plugin/example_hello_world_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/example_hello_world_test.go b/plugin/example_hello_world_test.go
index 0da171eb7..26f25c91a 100644
--- a/plugin/example_hello_world_test.go
+++ b/plugin/example_hello_world_test.go
@@ -12,7 +12,7 @@ type HelloWorldPlugin struct {
}
func (p *HelloWorldPlugin) ServeHTTP(c *plugin.Context, w http.ResponseWriter, r *http.Request) {
- fmt.Fprintf(w, "Hello, world!")
+ fmt.Fprint(w, "Hello, world!")
}
// This example demonstrates a plugin that handles HTTP requests which respond by greeting the