call OnActivate after plugin crash, update example (#7940)

Этот коммит содержится в:
Chris
2017-12-05 08:19:32 -06:00
коммит произвёл Joram Wilander
родитель 7a1f81cd52
Коммит 3c7b40063d
6 изменённых файлов: 51 добавлений и 40 удалений

Просмотреть файл

@@ -12,9 +12,10 @@ type HelloUserPlugin struct {
api plugin.API
}
func (p *HelloUserPlugin) OnActivate(api plugin.API) {
func (p *HelloUserPlugin) OnActivate(api plugin.API) error {
// Just save api for later when we need to look up users.
p.api = api
return nil
}
func (p *HelloUserPlugin) ServeHTTP(w http.ResponseWriter, r *http.Request) {