Go package to get links from a string.
$ > go get github.com/sbstjn/link
import "github.com/sbstjn/link"
func main() {
item := link.Get(`Bonjour, https://sbstjn.com is nice.`)
// Will show https://sbstjn.com
fmt.Println(item.String())
list := link.GetAll(`Bonjour, https://sbstjn.com is nice, but https://example.com too!`)
// Will show [https://sbstjn.com https://example.com]
fmt.Println(list)
}
Feel free to use the code, it's released using the MIT license.
You are welcome to contribute to this project! ๐
To make sure you have a pleasant experience, please read the code of conduct. It outlines core values and beliefs and will make working together a happier experience.