text

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff

func Diff(a, b string) (result string)

Diff return a diff like string, comparing string A and string B

func IsURL

func IsURL(location string) bool

IsURL tests if a string is a valid http URL

func ReadAll

func ReadAll(location string) (string, error)

ReadAll reads text content from a location (URL or filepath). The location accepts multiple input strings: starting with either "http://", "https://", or file url "file://" or filepath (default)

func ReadLine

func ReadLine(location string, line int) (string, error)

ReadLine reads the specified line of text from the specified location (URL or filepath). The location accepts multiple input strings: starting with either "http://", "https://", or file url "file://" or filepath (default)

func Show

func Show(content string) (result string)

Show return a string where each line start with a tabulation to increase visibility

func WriteToFile

func WriteToFile(content string, filename string) (err error)

WriteToFile write a string to a file

Types

This section is empty.

Jump to

Keyboard shortcuts

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