call OnActivate after plugin crash, update example (#7940)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
7a1f81cd52
Коммит
3c7b40063d
@@ -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) {
|
||||
|
||||
Ссылка в новой задаче
Block a user