Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sbstjn/link
Go package to parse links from strings
https://github.com/sbstjn/link
go golang parsing regexp
Last synced: about 17 hours ago
JSON representation
Go package to parse links from strings
- Host: GitHub
- URL: https://github.com/sbstjn/link
- Owner: sbstjn
- License: mit
- Created: 2018-07-21T18:05:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-23T06:39:40.000Z (over 6 years ago)
- Last Synced: 2024-11-09T20:45:02.371Z (about 2 months ago)
- Topics: go, golang, parsing, regexp
- Language: Go
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# sbstjn/link
[![Current Release](https://badgen.now.sh/github/release/sbstjn/link)](https://github.com/sbstjn/link/releases)
[![MIT License](https://badgen.now.sh/badge/License/MIT/blue)](https://github.com/sbstjn/link/blob/master/LICENSE.md)
[![CircleCI Build Status](https://badgen.now.sh/circleci/github/sbstjn/link)](https://circleci.com/gh/sbstjn/link)Go package to get links from a string.
## Install
```bash
$ > go get github.com/sbstjn/link
```## Usage
```go
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)
}
```## License
Feel free to use the code, it's released using the [MIT license](LICENSE.md).
## Contribution
You are welcome to contribute to this project! 😘
To make sure you have a pleasant experience, please read the [code of conduct](CODE_OF_CONDUCT.md). It outlines core values and beliefs and will make working together a happier experience.