mirror of
https://github.com/thegeeklab/url-parser.git
synced 2024-11-22 13:10:41 +00:00
fix formatting
This commit is contained in:
parent
f7ebf4bb01
commit
92635b4f33
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
[![Build Status](https://img.shields.io/drone/build/xoxys/url-parser?logo=drone)](https://cloud.drone.io/xoxys/url-parser)
|
[![Build Status](https://img.shields.io/drone/build/xoxys/url-parser?logo=drone)](https://cloud.drone.io/xoxys/url-parser)
|
||||||
[![Codecov](https://img.shields.io/codecov/c/github/xoxys/url-parser)](https://codecov.io/gh/xoxys/url-parser)
|
[![Codecov](https://img.shields.io/codecov/c/github/xoxys/url-parser)](https://codecov.io/gh/xoxys/url-parser)
|
||||||
|
[![Go Report Card](https://goreportcard.com/badge/github.com/xoxys/url-parser)](https://goreportcard.com/report/github.com/xoxys/url-parser)
|
||||||
[![License: MIT](https://img.shields.io/github/license/xoxys/url-parser)](LICENSE)
|
[![License: MIT](https://img.shields.io/github/license/xoxys/url-parser)](LICENSE)
|
||||||
|
|
||||||
Inspired by [herloct/url-parser](https://github.com/herloct/url-parser), a simple command-line utility for parsing URLs.
|
Inspired by [herloct/url-parser](https://github.com/herloct/url-parser), a simple command-line utility for parsing URLs.
|
||||||
|
@ -11,7 +11,7 @@ func TestParseURL(t *testing.T) {
|
|||||||
urlString := "postgres://user:pass@host.com:5432/path/to?key=value&other=other%20value#some-fragment"
|
urlString := "postgres://user:pass@host.com:5432/path/to?key=value&other=other%20value#some-fragment"
|
||||||
|
|
||||||
tables := []TestParseData{
|
tables := []TestParseData{
|
||||||
TestParseData{
|
{
|
||||||
urlString: urlString,
|
urlString: urlString,
|
||||||
expected: urlString,
|
expected: urlString,
|
||||||
},
|
},
|
||||||
|
@ -18,7 +18,7 @@ func TestPassword(t *testing.T) {
|
|||||||
urlString := "postgres://user:pass@host.com:5432/path/to?key=value&other=other%20value#some-fragment"
|
urlString := "postgres://user:pass@host.com:5432/path/to?key=value&other=other%20value#some-fragment"
|
||||||
|
|
||||||
tables := []TestPasswordData{
|
tables := []TestPasswordData{
|
||||||
TestPasswordData{
|
{
|
||||||
urlString: urlString,
|
urlString: urlString,
|
||||||
expected: "pass",
|
expected: "pass",
|
||||||
},
|
},
|
||||||
|
@ -19,12 +19,12 @@ func TestPath(t *testing.T) {
|
|||||||
urlString := "postgres://user:pass@host.com:5432/path/to?key=value&other=other%20value#some-fragment"
|
urlString := "postgres://user:pass@host.com:5432/path/to?key=value&other=other%20value#some-fragment"
|
||||||
|
|
||||||
tables := []TestPathData{
|
tables := []TestPathData{
|
||||||
TestPathData{
|
{
|
||||||
urlString: urlString,
|
urlString: urlString,
|
||||||
pathIndex: -1,
|
pathIndex: -1,
|
||||||
expected: "/path/to",
|
expected: "/path/to",
|
||||||
},
|
},
|
||||||
TestPathData{
|
{
|
||||||
urlString: urlString,
|
urlString: urlString,
|
||||||
pathIndex: 0,
|
pathIndex: 0,
|
||||||
expected: "path",
|
expected: "path",
|
||||||
|
@ -18,7 +18,7 @@ func TestRun(t *testing.T) {
|
|||||||
urlString := "postgres://user:pass@host.com:5432/path/to?key=value&other=other%20value#some-fragment"
|
urlString := "postgres://user:pass@host.com:5432/path/to?key=value&other=other%20value#some-fragment"
|
||||||
|
|
||||||
tables := []TestRunData{
|
tables := []TestRunData{
|
||||||
TestRunData{
|
{
|
||||||
urlString: urlString,
|
urlString: urlString,
|
||||||
expected: urlString,
|
expected: urlString,
|
||||||
},
|
},
|
||||||
|
@ -18,7 +18,7 @@ func TestScheme(t *testing.T) {
|
|||||||
urlString := "postgres://user:pass@host.com:5432/path/to?key=value&other=other%20value#some-fragment"
|
urlString := "postgres://user:pass@host.com:5432/path/to?key=value&other=other%20value#some-fragment"
|
||||||
|
|
||||||
tables := []TestSchemeData{
|
tables := []TestSchemeData{
|
||||||
TestSchemeData{
|
{
|
||||||
urlString: urlString,
|
urlString: urlString,
|
||||||
expected: "postgres",
|
expected: "postgres",
|
||||||
},
|
},
|
||||||
|
@ -18,7 +18,7 @@ func TestUser(t *testing.T) {
|
|||||||
urlString := "postgres://user:pass@host.com:5432/path/to?key=value&other=other%20value#some-fragment"
|
urlString := "postgres://user:pass@host.com:5432/path/to?key=value&other=other%20value#some-fragment"
|
||||||
|
|
||||||
tables := []TestUserData{
|
tables := []TestUserData{
|
||||||
TestUserData{
|
{
|
||||||
urlString: urlString,
|
urlString: urlString,
|
||||||
expected: "user",
|
expected: "user",
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user