util

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const IMAGEREGEX = `<img[^>]+src="([^">]+)"`

IMAGEREGEX to extract the image html tag

Variables

This section is empty.

Functions

func ConvertTo8BitPNG

func ConvertTo8BitPNG(img image.Image, imgData *bytes.Buffer) error

ConvertTo8BitPNG converts an image of any type to a PNG with 8-bit color depth

func CurrentDir added in v0.10.1

func CurrentDir() (string, error)

CurrentDir

func FindMaxValueInSlice added in v0.6.1

func FindMaxValueInSlice(values []int) int

FindMaxValueInSlice return the max value

func ImageType added in v0.5.0

func ImageType(mimeStr string) (tp string)

ImageType return the image type

func IsURLValid added in v0.6.1

func IsURLValid(value string) bool

IsURLValid will exclude those url containing `.gif` and `logo`.

func IsValueInSlice

func IsValueInSlice(valueToCheck string, values []string) bool

IsValueInSlice will check if a value is already in a slice.

func PathSetup added in v0.6.1

func PathSetup(source, name string) (string, error)

PathSetup will create the folders where the comic will be saved

func TrimAndSplitURL added in v0.10.1

func TrimAndSplitURL(u string) []string

TrimAndSplitURL will trim tailing "/" and split url

func URLSource added in v0.6.1

func URLSource(u string) (string, error)

URLSource will retrieve the url hostname.

Types

This section is empty.

Jump to

Keyboard shortcuts

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