hugo: Index | Files

package create

import ""

Package create contains functions for to create Resource objects. This will typically non-files.


Package Files


type Client Uses

type Client struct {
    // contains filtered or unexported fields

Client contains methods to create Resource objects. tasks to Resource objects.

func New Uses

func New(rs *resources.Spec) *Client

New creates a new Client with the given specification.

func (*Client) FromString Uses

func (c *Client) FromString(targetPath, content string) (resource.Resource, error)

FromString creates a new Resource from a string with the given relative target path.

func (*Client) Get Uses

func (c *Client) Get(filename string) (resource.Resource, error)

Get creates a new Resource by opening the given filename in the assets filesystem.

func (*Client) GetMatch Uses

func (c *Client) GetMatch(pattern string) (resource.Resource, error)

GetMatch gets first resource matching the given pattern from the assets filesystem.

func (*Client) Match Uses

func (c *Client) Match(pattern string) (resource.Resources, error)

Match gets the resources matching the given pattern from the assets filesystem.

Package create imports 8 packages (graph) and is imported by 9 packages. Updated 2019-08-18. Refresh now. Tools for package owners.