utility

package
v0.0.0-...-c053214 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: MIT Imports: 8 Imported by: 0

README

utility

Documentation

Index

Constants

View Source
const README_TEMPLATE = `` /* 524-byte string literal not displayed */

Variables

This section is empty.

Functions

func CreateMarkdownHeading

func CreateMarkdownHeading(text string, level int) string

func CreateMarkdownHeadings

func CreateMarkdownHeadings(text []string, level int) string

func CreateMarkdownList

func CreateMarkdownList(items []string) string

func GetInput

func GetInput(question string) string

print the question and wait for a user-input

func RequestDecisionInput

func RequestDecisionInput(question string, preferTrue bool) bool

print the question and wait for a "y/n" answer from the user

func RequestValueInput

func RequestValueInput(requestedValue string, defaultValue interface{}) string

ask for the requestedValue and return either the user-input or the default value

func RequestValueListInput

func RequestValueListInput(requestedValue string) []string

ask for the requestedValue and gather the list items from the input

Types

type Readme

type Readme struct {
	Title            string   `json:"title"`
	Description      string   `json:"description"`
	RepositoryURL    string   `json:"repository-url"`
	Headings         []string `json:"headings"`
	Requirements     []string `json:"requirements"`
	ShowContributors bool     `json:"show-contributors"`
	ShowShields      bool     `json:"show-shields"`
	Watermark        bool     `json:"watermark"`
}

func (Readme) Render

func (readme Readme) Render() ([]byte, error)

func (Readme) ToMap

func (r Readme) ToMap() map[string]interface{}

Jump to

Keyboard shortcuts

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