Documentation ¶
Overview ¶
Package parser provides methods to grab all links from markdown files.
Index ¶
- func DownloadURL(URL string) (string, error)
- func GetAllLinks(markdown string) map[string]string
- func ParseImageLink(line string) string
- func ParseLink(line string) map[string]string
- func ParseMarkdownFile(fileName string) (map[string]string, error)
- func ParseMarkdownURL(URL string) (map[string]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadURL ¶
DownloadURL returns Body response from the URL.
func GetAllLinks ¶
GetAllLinks returns all links and their names from a given markdown file.
func ParseImageLink ¶
ParseImageLink parses an image line and grabs the Link attached to it. The format of the line should be as follows: `![](Link)`.
func ParseLink ¶
ParseLink parses a line and grabs the Link, Title and the Description attached to it. The format of the line should be as follows: `- [Title](Link) - Description`. Description can be omitted.
func ParseMarkdownFile ¶
ParseMarkdownFile parses a markdown file and returns all markdown links from it.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.