all repos — honk @ b295e337d18dd7f70cfee5bd4d4105b531fcdeb3

my fork of honk

fix host extraction from actors without paths
Ted Unangst tedu@tedunangst.com
Fri, 14 Jun 2019 16:32:10 -0400
commit

b295e337d18dd7f70cfee5bd4d4105b531fcdeb3

parent

5d876923c6ec459dea5713c61fa0453698fe6969

1 files changed, 3 insertions(+), 2 deletions(-)

jump to
M fun.gofun.go

@@ -311,10 +311,11 @@ return s

} var re_unurl = regexp.MustCompile("https://([^/]+).*/([^/]+)") +var re_urlhost = regexp.MustCompile("https://([^/]+)") func originate(u string) string { - m := re_unurl.FindStringSubmatch(u) - if len(m) > 2 { + m := re_urlhost.FindStringSubmatch(u) + if len(m) > 1 { return m[1] } return ""