filesystem

package
v0.0.0-...-7c5da1f Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidFormat = errors.New("invalid file format, please include a header / body separator \"--\"")
View Source
var ErrInvalidTime = errors.New("invalid time format, please use YYYY-MM-DD HH:MM")

Functions

func ParseFileContent

func ParseFileContent(content string) (blog.Post, error)

Types

type PostRepo

type PostRepo struct {
	BasePath string
}

func NewPostRepo

func NewPostRepo(basePath string) *PostRepo

func (*PostRepo) GetAllPosts

func (r *PostRepo) GetAllPosts() ([]blog.Post, error)

func (*PostRepo) GetPostByPath

func (r *PostRepo) GetPostByPath(path string) (blog.Post, error)

Jump to

Keyboard shortcuts

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