convert

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Transform various data strings to other data strings

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Date

func Date(d string) (string, string, error)

Resolve the date d from format YYYY-MM-DD Returns a pretty date and a machine date

func FileBase

func FileBase(f string) string

Given /path/to/filename.ext, return filename

func Href

func Href(f string, inDir string, prefixSlash bool) string

Return the href inDir/a/b/c/file.md -> a/b/c/file

func NavCrumbs(f string, inDir string, isExt bool) ([]string, []string)

If link is "/a/b/c/file.md"

crumbs is {"a", "b", "c"}

crumbLinks is {"/a/index.html", "/a/b/index.html", "a/b/c/index.html"}

func Title

func Title(mt string, fn string) string

Return title mt else fn

Types

This section is empty.

Jump to

Keyboard shortcuts

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