gosling: github.com/leonidboykov/gosling Index | Files

package gosling

import "github.com/leonidboykov/gosling"

Package gosling builds html files with redirects commands for static sites

Example:

package main

import (
	"fmt"
	"os"

	"github.com/leonidboykov/gosling"
)

func main() {
	if err := gosling.BuildRedirect("https://example.com", os.Stdout); err != nil {
		fmt.Println(err)
	}
}

Index

Package Files

doc.go redirects.go

func BuildRedirect Uses

func BuildRedirect(link string, wr io.Writer) error

BuildRedirect builds a redirect to a destination writer

func BuildRedirects Uses

func BuildRedirects(redir Redirects, inpath string) error

BuildRedirects builds redirects to provided folder

type Redirects Uses

type Redirects map[string]string

Redirects holds redirects

func NewRedirects Uses

func NewRedirects(inpath string) (Redirects, error)

NewRedirects parses redirects from a JSON files

Package gosling imports 6 packages (graph). Updated 2018-12-18. Refresh now. Tools for package owners.