repo

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteArticle

func WriteArticle(libraryPath, templatePath string, article Article) (err error)

Types

type Article

type Article struct {
	Layout       string    `yaml:"layout"`
	Name         string    `yaml:"name"`
	GitHub       string    `yaml:"github"`
	Versions     []string  `yaml:"versions"`
	Date         time.Time `yaml:"updated_at"`
	Size         string    `yaml:"size"`
	Description  string    `yaml:"description"`
	ContainerURL string    `yaml:"container_url"`
}

func ParseArticle

func ParseArticle(libraryPath, containerName string) (result Article, err error)

func (*Article) AddDescription

func (a *Article) AddDescription(new string)

AddDescription adds a description to a an article

func (*Article) AddName

func (a *Article) AddName(name string)

AddName sets the name of an article

func (*Article) AddVersion

func (a *Article) AddVersion(new string)

AddVersion adds a version to the article metadata

func (*Article) SetDate

func (a *Article) SetDate(new time.Time)

SetDate sets the published date for an article

func (*Article) SetSize

func (a *Article) SetSize(new string)

SetSize adds/updates the size of a container to a an article

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL