utils

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Copyright © 2021 Mirco Veltri <github@mircoveltri.me>

Use of this source code is governed by Apache 2.0 license that can be found in the LICENSE file.

Copyright © 2021 Mirco Veltri <github@mircoveltri.me>

Use of this source code is governed by Apache 2.0 license that can be found in the LICENSE file.

Copyright © 2021 Mirco Veltri <github@mircoveltri.me>

Use of this source code is governed by Apache 2.0 license that can be found in the LICENSE file.

Copyright © 2021 Mirco Veltri <github@mircoveltri.me>

Use of this source code is governed by Apache 2.0 license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIfError added in v0.2.0

func CheckIfError(err error)

Panics if an error is not nil

func CurrentYear

func CurrentYear() string

func GetAvailableNPMClientList added in v0.2.4

func GetAvailableNPMClientList() []string

func GitClone

func GitClone(sveltinTemplate *config.AppTemplate, inpath string)

func PlusOne

func PlusOne(x int) int

func Sum

func Sum(x int, y int) int

func ToLibFilename

func ToLibFilename(txt string) string

func ToMDFile

func ToMDFile(text string) string

func ToTitle

func ToTitle(txt string) string

func ToURL

func ToURL(txt string) string

func Today

func Today() string

func Trimmed

func Trimmed(txt string) string

Types

type LoggerWriter

type LoggerWriter struct {
	// contains filtered or unexported fields
}

func NewLoggerWriter

func NewLoggerWriter() LoggerWriter

func (LoggerWriter) AppendItem

func (w LoggerWriter) AppendItem(message string)

func (LoggerWriter) Indent

func (w LoggerWriter) Indent()

func (LoggerWriter) Render

func (w LoggerWriter) Render() string

func (LoggerWriter) Reset

func (w LoggerWriter) Reset()

func (LoggerWriter) UnIndent

func (w LoggerWriter) UnIndent()

type PrinterBuffer

type PrinterBuffer struct {
	// contains filtered or unexported fields
}

func PrettyPrinter

func PrettyPrinter(pc *PrinterContent) PrinterBuffer

func (PrinterBuffer) Print

func (pb PrinterBuffer) Print()

func (PrinterBuffer) ToString

func (pb PrinterBuffer) ToString() string

type PrinterContent

type PrinterContent struct {
	Title string
	// contains filtered or unexported fields
}

func (*PrinterContent) SetContent

func (p *PrinterContent) SetContent(content string)

Jump to

Keyboard shortcuts

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