stimmtausch: Index | Files

package util

import ""


Package Files

ensure_dir.go logo.go strip_ansi.go


var StripANSI = regexp.MustCompile("\x1b\\[\\d+(;\\d+)*m")

StripANSI is a regexp that matches ANSI escape codes for the purpose of removing them where necessary.

func EnsureDir Uses

func EnsureDir(path string) error

EnsureDir ensures that a directory is in place before opening a file there.

func Logo() string

func StripANSIFromFile Uses

func StripANSIFromFile(in, out string) error

StripANSIFromFile reads in contents from one file line by line, strips them of their ANSI escape codes, then writes them to another.

Package util imports 6 packages (graph) and is imported by 5 packages. Updated 2020-08-14. Refresh now. Tools for package owners.