func cliHistory(c *minicli.Command) *minicli.Response { resp := &minicli.Response{ Host: hostname, Response: minicli.History(), } return resp }
func cliWrite(c *minicli.Command, resp *minicli.Response) error { file, err := os.Create(c.StringArgs["file"]) if err != nil { return err } defer file.Close() _, err = file.WriteString(minicli.History()) return err }
func cliWrite(c *minicli.Command) *minicli.Response { resp := &minicli.Response{Host: hostname} file, err := os.Create(c.StringArgs["file"]) if err != nil { resp.Error = err.Error() return resp } defer file.Close() _, err = file.WriteString(minicli.History()) if err != nil { resp.Error = err.Error() } return resp }
func cliHistory(c *minicli.Command, resp *minicli.Response) error { resp.Response = minicli.History() return nil }