lib

package
v0.0.0-...-32b471e Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Post

type Post struct {
	Title  string    `json:"title"`
	Body   string    `json:"body"`
	Id     string    `json:"id"`
	Author string    `json:"author"`
	Time   time.Time `json:"time"`
}

func FormatPost

func FormatPost(post Post) Post

func NewBasicPost

func NewBasicPost(content string, author string) Post

func RemovePostById

func RemovePostById(posts []Post, id string) []Post

type Postfile

type Postfile struct {
	Filetype string `json:"filetype"`
	Version  string `json:"version"`
	Posts    []Post `json:"posts"`
}

func Format

func Format(postfile Postfile) (outfile Postfile, err error)

TODO: Prob should be a pointer

Jump to

Keyboard shortcuts

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