Skip to content

Commit

Permalink
Merge pull request #12 from edoardottt/devel
Browse files Browse the repository at this point in the history
new website
  • Loading branch information
edoardottt authored Nov 10, 2024
2 parents ba080c7 + d4f2263 commit 215432a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ License 📝
-------

This repository is under [MIT License](https://github.com/edoardottt/defango/blob/main/LICENSE).
[edoardoottavianelli.it](https://www.edoardoottavianelli.it) to contact me.
[edoardottt.com](https://edoardottt.com) to contact me.
44 changes: 22 additions & 22 deletions defan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ func TestURL(t *testing.T) {
},
{
name: "https URL",
input: "https://www.edoardoottavianelli.it",
want: "hxxps:https://www[.]edoardoottavianelli[.]it",
input: "https://edoardottt.com",
want: "hxxps:https://edoardottt[.]com",
err: nil,
},
{
Expand All @@ -101,8 +101,8 @@ func TestURL(t *testing.T) {
},
{
name: "http URL",
input: "https://www.edoardoottavianelli.it",
want: "hxxp:https://www[.]edoardoottavianelli[.]it",
input: "https://edoardottt.com",
want: "hxxp:https://edoardottt[.]com",
err: nil,
},
{
Expand All @@ -113,8 +113,8 @@ func TestURL(t *testing.T) {
},
{
name: "http URL and port",
input: "https://www.edoardoottavianelli.it:8080",
want: "hxxp:https://www[.]edoardoottavianelli[.]it[:]8080",
input: "https://edoardottt.com:8080",
want: "hxxp:https://edoardottt[.]com[:]8080",
err: nil,
},
{
Expand Down Expand Up @@ -143,26 +143,26 @@ func TestURL(t *testing.T) {
},
{
name: "URL no protocol",
input: "www.edoardoottavianelli.it",
want: "www[.]edoardoottavianelli[.]it",
input: "edoardottt.com",
want: "edoardottt[.]com",
err: nil,
},
{
name: "URL malformed protocol",
input: ":https://www.edoardoottavianelli.it",
want: ":https://www[.]edoardoottavianelli[.]it",
input: ":https://edoardottt.com",
want: ":https://edoardottt[.]com",
err: nil,
},
{
name: "URL no protocol and port",
input: "www.edoardoottavianelli.it:8080",
want: "www[.]edoardoottavianelli[.]it[:]8080",
input: "edoardottt.com:8080",
want: "edoardottt[.]com[:]8080",
err: nil,
},
{
name: "https URL (url.URL)",
input: *parseURL("https://www.edoardoottavianelli.it"),
want: "hxxps:https://www[.]edoardoottavianelli[.]it",
input: *parseURL("https://edoardottt.com"),
want: "hxxps:https://edoardottt[.]com",
err: nil,
},
{
Expand All @@ -173,8 +173,8 @@ func TestURL(t *testing.T) {
},
{
name: "http URL (url.URL)",
input: *parseURL("https://www.edoardoottavianelli.it"),
want: "hxxp:https://www[.]edoardoottavianelli[.]it",
input: *parseURL("https://edoardottt.com"),
want: "hxxp:https://edoardottt[.]com",
err: nil,
},
{
Expand All @@ -185,8 +185,8 @@ func TestURL(t *testing.T) {
},
{
name: "http URL and port (url.URL)",
input: *parseURL("https://www.edoardoottavianelli.it:8080"),
want: "hxxp:https://www[.]edoardoottavianelli[.]it[:]8080",
input: *parseURL("https://edoardottt.com:8080"),
want: "hxxp:https://edoardottt[.]com[:]8080",
err: nil,
},
{
Expand Down Expand Up @@ -215,14 +215,14 @@ func TestURL(t *testing.T) {
},
{
name: "URL no protocol (url.URL)",
input: *parseURL("www.edoardoottavianelli.it"),
want: "www[.]edoardoottavianelli[.]it",
input: *parseURL("edoardottt.com"),
want: "edoardottt[.]com",
err: nil,
},
{
name: "URL no protocol and port (url.URL)",
input: *parseURL("www.edoardoottavianelli.it:8080"),
want: "www[.]edoardoottavianelli[.]it[:]8080",
input: *parseURL("edoardottt.com:8080"),
want: "edoardottt[.]com[:]8080",
err: nil,
},
{
Expand Down

0 comments on commit 215432a

Please sign in to comment.