Page

package
v0.0.0-...-a1c84da Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

type Page struct {
	Title string
	Body  []byte
}

Page Struct defining the Title and Body of the wiki page.

func LoadPage

func LoadPage(title string) (*Page, error)

LoadPage First, the function constructs the title from the param. Second, it reads the contents into a new variable, and returns a pointer to the Page literal.

func (Page) Save

func (p Page) Save() error

save Takes the post body and saves it to a file, naming it the title. The signature is a method that takes a receiver p, a pointer to Page.

Jump to

Keyboard shortcuts

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