Documentation ¶
Index ¶
- Constants
- func ConvertToJPG(img image.Image, imgData *bytes.Buffer) error
- func CurrentDir() (string, error)
- func DirectoryOrFileDoesNotExist(filePath string) bool
- func GenerateFileName(dir, name, issueNumber, format string) string
- func ImageType(mimeStr string) (tp string)
- func ImagesPathSetup(outputFolder, source, name, issueNumber string) (string, error)
- func IsURLValid(value string) bool
- func IsValueInSlice(valueToCheck string, values []string) bool
- func Parse(s string) string
- func PathSetup(outputFolder, source, name string) (string, error)
- func SaveImage(w io.Writer, content io.Reader, format string) error
- func TrimAndSplitURL(u string) []string
- func URLSource(u string) (string, error)
Constants ¶
View Source
const IMAGEREGEX = `<img[^>]+src="([^">]+)"`
IMAGEREGEX to extract the image html tag
Variables ¶
This section is empty.
Functions ¶
func ConvertToJPG ¶ added in v0.12.1
ConvertToJPG converts an image to jpeg
func CurrentDir ¶ added in v0.10.1
CurrentDir return the path where the executable is
func DirectoryOrFileDoesNotExist ¶ added in v0.17.0
DirectoryOrFileDoesNotExist check if a directory/file exist or not
func GenerateFileName ¶ added in v0.12.3
GenerateFileName will return the path where the file should be saved
func ImagesPathSetup ¶ added in v0.17.0
func IsURLValid ¶ added in v0.6.1
IsURLValid will exclude those url containing `.gif` and `logo`.
func IsValueInSlice ¶
IsValueInSlice will check if a value is already in a slice.
func TrimAndSplitURL ¶ added in v0.10.1
TrimAndSplitURL will trim tailing "/" and split url
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.