From 753c1809470f6e4e743a5a71234b67e88ea1f0d8 Mon Sep 17 00:00:00 2001 From: shylinux Date: Sun, 16 Apr 2023 22:49:23 +0800 Subject: [PATCH] opt some --- misc/git/service.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/git/service.go b/misc/git/service.go index 36e70237..2ca01f2d 100644 --- a/misc/git/service.go +++ b/misc/git/service.go @@ -85,14 +85,14 @@ const ( const SERVICE = "service" func init() { - web.Index.MergeCommands(ice.Commands{"/x/": {Hand: func(m *ice.Message, arg ...string) { + web.Index.MergeCommands(ice.Commands{"/x/": {Actions: aaa.WhiteAction(), Hand: func(m *ice.Message, arg ...string) { if arg[0] == ice.LIST { m.Cmd(Prefix(SERVICE), func(value ice.Maps) { m.Push(nfs.REPOS, web.MergeLink(m, "/x/"+kit.Keys(value[nfs.REPOS], GIT))) }) m.Sort(nfs.REPOS) return } else if m.RenderVoid(); m.Option("go-get") == "1" { p := _git_url(m, path.Join(arg...)) - m.RenderResult(kit.Format(``, kit.Format(`%s git %s`, kit.TrimExt(strings.Split(p, "://")[1], GIT), p))) + m.RenderResult(kit.Format(``, kit.Format(`%s git %s`, strings.TrimSuffix(strings.Split(p, "://")[1], nfs.PT+GIT), p))) return } switch repos, service := _service_param(m, arg...); service {