template

package
v0.0.0-...-e9051c8 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtendedString

type ExtendedString string

ExtendedString is a string that has some added methods to make it easier to use inside of a Template

func (ExtendedString) Fields

func (es ExtendedString) Fields() []ExtendedString

Fields implements the functionality of strings.Fields. So Fields splits the string s around each instance of one or more consecutive white space characters, as defined by unicode.IsSpace, returning a slice of substrings of s or an empty slice if s contains only white space.

func (ExtendedString) LoadFile

func (es ExtendedString) LoadFile() ExtendedString

LoadFile tries loading the file whose name is stored on es and returning the whole content of the file as an string

func (ExtendedString) LoadRelativeFile

func (es ExtendedString) LoadRelativeFile(basePath string) ExtendedString

LoadRelativeFile tries loading the file whose name is stored on es, using basePath as the basePath (so es is assumed to be a relative path), and it returns returning the whole content of the file as an string

func (ExtendedString) LoadRelativeFileES

func (es ExtendedString) LoadRelativeFileES(basePath ExtendedString) ExtendedString

func (ExtendedString) Split

func (es ExtendedString) Split(sep string) []ExtendedString

Split implements the functionality of strings.Split. So Split slices ess into all substrings separated by sep and returns a slice of the substrings between those separators. If s does not contain sep and sep is not empty, Split returns a slice of length 1 whose only element is s. If sep is empty, Split splits after each UTF-8 sequence. If both s and sep are empty, Split

returns an empty slice.

func (ExtendedString) ToBase64

func (es ExtendedString) ToBase64() ExtendedString

ToBase64 returns the es string converted to Base64.

func (ExtendedString) ToJSON

func (es ExtendedString) ToJSON() ExtendedString

ToJSON returns the es string JSONified.

Jump to

Keyboard shortcuts

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