func (c *Config) SaveRestClient(client *tags.RestClient) error {
	if !c.Persist {
		return nil
	}

	p, err := c.restSessionFile()
	if err != nil {
		return err
	}

	log.Printf("[DEBUG] Will persist REST client session data to %q", p)
	err = os.MkdirAll(filepath.Dir(p), 0700)
	if err != nil {
		return err
	}

	err = ioutil.WriteFile(p, []byte(client.SessionID()), 0600)
	if err != nil {
		return err
	}

	return nil
}
func (c *Config) SaveRestClient(client *tags.RestClient) error {
	if !c.Persist {
		return nil
	}

	p, err := c.restSessionFile()
	if err != nil {
		return err
	}

	log.Printf("[DEBUG] Will persist REST client session data to %q", p)
	err = os.MkdirAll(filepath.Dir(p), 0700)
	if err != nil {
		return err
	}

	err = ioutil.WriteFile(p, []byte(client.SessionID()), 0600)
	if err != nil {
		return err
	}

	return nil
}
func ( c * Config ) SaveRestClient ( client * tags . RestClient ) error { if ! c . Persist { return nil } p , err := c . restSessionFile ( ) if err != nil { return err } log . Printf ( " " , p ) err = os . MkdirAll ( filepath . Dir ( p ) , 0700 ) if err != nil { return err } err = ioutil . WriteFile ( p , [ ] byte ( client . SessionID ( ) ) , 0600 ) if err != nil { return err } return nil }
// SaveRestClient saves the REST client session ID to the supplied path. This
// facilitates re-use of the session at a later date.
SaveRestClient saves the REST client session ID to the supplied path . This facilitates re - use of the session at a later date .