Skip to content

Commit d6ed04f

Browse files
author
ke.like
committed
Clean up
1 parent b7d1c81 commit d6ed04f

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

Diff for: client.go

-11
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"io/ioutil"
88
"net/http"
99
"net/url"
10-
"regexp"
1110
"strconv"
1211
"sync"
1312
"time"
@@ -362,13 +361,3 @@ func (c *Client) DeleteProject(name string) error {
362361
func (c *Client) Close() error {
363362
return nil
364363
}
365-
366-
func parseRegionFromEndpoint(endpoint string) string {
367-
exp := regexp.MustCompile(
368-
`^(?:https?:\/\/)?([a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)+?)(?:-intranet|-share)?\..*`)
369-
matches := exp.FindStringSubmatch(endpoint)
370-
if len(matches) != 2 {
371-
return ""
372-
}
373-
return matches[1]
374-
}

0 commit comments

Comments
 (0)