render

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const Template = `` /* 3578-byte string literal not displayed */

Based on https://github.com/lithammer/go-wiki

Variables

This section is empty.

Functions

func Diff

func Diff(file, hash string) ([]byte, error)

func DiffHandler

func DiffHandler(w http.ResponseWriter, r *http.Request)

func IsGitRepository

func IsGitRepository(path string) bool

Check if a path contains a Git repository

func Serve

func Serve(folder, port string) error

func WikiHandler

func WikiHandler(w http.ResponseWriter, r *http.Request)

Types

type Commit

type Commit struct {
	Author  string
	Date    time.Time
	File    string
	Hash    string
	Subject string
}

func Commits

func Commits(filename string, n int) ([]Commit, error)

func (Commit) Diff

func (c Commit) Diff() ([]byte, error)

func (Commit) FileNoExt

func (c Commit) FileNoExt() string

func (Commit) HumanDate

func (c Commit) HumanDate() string

type Wiki

type Wiki struct {
	Body      template.HTML
	Markdown  []byte
	Commits   []Commit
	CustomCSS string
	// contains filtered or unexported fields
}

func (Wiki) Title

func (w Wiki) Title() string

func (*Wiki) Write

func (w *Wiki) Write(rw http.ResponseWriter)

Jump to

Keyboard shortcuts

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