all repos — elgit @ cfea2a3ba078b13b46a99963953175f6d1c16ff1

fork of legit: web frontend for git, written in go

address linter complaints

Alan Pearce
commit

cfea2a3ba078b13b46a99963953175f6d1c16ff1

parent

6c5cc57b578117ef8d56432f3e8b114cb39b5aee

1 file changed, 3 insertions(+), 3 deletions(-)

changed files
M git/service/service.gogit/service/service.go
@@ -18,13 +18,13 @@ const timeout = 1 * time.Minute
// Mostly from charmbracelet/soft-serve and sosedoff/gitkit. -type ServiceCommand struct { +type Command struct { Dir string Stdin io.Reader Stdout http.ResponseWriter } -func (c *ServiceCommand) InfoRefs(ctx context.Context) error { +func (c *Command) InfoRefs(ctx context.Context) error { ctx, cancel := context.WithTimeout(ctx, timeout) defer cancel() cmd := exec.CommandContext(ctx, "git", []string{
@@ -79,7 +79,7 @@
return nil } -func (c *ServiceCommand) UploadPack(ctx context.Context) (err error) { +func (c *Command) UploadPack(ctx context.Context) (err error) { ctx, cancel := context.WithTimeout(ctx, timeout) defer cancel() cmd := exec.CommandContext(ctx, "git", []string{