Example #1
0
func cliHistory(c *minicli.Command) *minicli.Response {
	resp := &minicli.Response{
		Host:     hostname,
		Response: minicli.History(),
	}

	return resp
}
Example #2
0
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
}
Example #3
0
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
}
Example #4
0
func cliHistory(c *minicli.Command, resp *minicli.Response) error {
	resp.Response = minicli.History()
	return nil
}