here

package module
v0.0.0-...-5e14eb6 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: MIT Imports: 2 Imported by: 7 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

here

here is a fork of TSUYUSATO Kitsune's heredoc for shortening the import path and combining the packages.

Documentation

Overview

Package here provides creation of here-documents from raw strings.

Golang supports raw-string syntax.

doc := `
	Foo
	Bar
`

But raw-string cannot recognize indentation. Thus such content is an indented string, equivalent to

"\n\tFoo\n\tBar\n"

I don't want this!

However this problem is solved by package here.

doc := here.Doc(`
	Foo
	Bar
`)

Is equivalent to

"Foo\nBar\n"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func D

func D(raw string) string

Shortcut here.Doc.

func Df

func Df(raw string, args ...interface{}) string

Shortcut here.Docf.

func Doc

func Doc(raw string) string

Doc returns un-indented string as here-document.

func Docf

func Docf(raw string, args ...interface{}) string

Docf returns unindented and formatted string as here-document. Formatting is done as for fmt.Printf().

Types

This section is empty.

Jump to

Keyboard shortcuts

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