utils

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

utility package for nvm/utils

Useful only for nvm (not the nvm-shim)

Index

Constants

This section is empty.

Variables

View Source
var Writer = tabwriter.NewWriter(os.Stderr, 1, 1, 4, ' ', 0)

customized writer to print help logs nicely

Functions

func FlushTabs

func FlushTabs()

flush tabbed output to stdout

func PrintTabs

func PrintTabs(str string)

aligns tabs with tabwriter

func Rename

func Rename(source, target string) (err error)

rename or move file; moving may be required if using a docker container with volumes

func SaveToFile

func SaveToFile(body []byte, filename string) error

save `body` bytes to `filename` TODO: this may be deprecated if we transfer http response directly to file, sha, and progresssbar

func UnGzip

func UnGzip(source, target string) (string, error)

func Untar

func Untar(tarball, target string) error

TODO: gzipping can be done with the tarring: https://cs.opensource.google/go/x/build/+/8c11e572:internal/untar/untar.go reverse the effects of tarring

Types

This section is empty.

Jump to

Keyboard shortcuts

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