Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides methods for interacting with gitignore.io
func NewClient ¶
NewClient creates and returns a new Client instance with the option to disable template updates using the noUpdate flag.
func (*Client) GetTemplate ¶
func (c *Client) GetTemplate(key string) (*TemplateInfo, error)
GetTemplate retrieves a template by its key from the internal cache. If templates are not loaded, it initialises them first.
func (*Client) ListTemplates ¶
ListTemplates retrieves the list of available template names from gitignore.io. Returns the sorted template names or an error.
func (*Client) UpdateTemplates ¶ added in v0.1.1
UpdateTemplates retrieves the list of available template names from gitignore.io and updates the internal cache.
Click to show internal directories.
Click to hide internal directories.