From daeb9127764fc9dd469294f755e277fdfca09a00 Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Wed, 10 Jun 2026 00:07:56 +0200 Subject: rtree: add support for multiple URLs per remote This requires changing the index format, which I'm using as an opportunity to: - move from YAML to JSON (so I can maybe kill the YAML parser dependency at some point) - move the index file into standard XDG paths --- internal/cli/command.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'internal/cli/command.go') diff --git a/internal/cli/command.go b/internal/cli/command.go index 8208aac..e2ad6f1 100644 --- a/internal/cli/command.go +++ b/internal/cli/command.go @@ -10,8 +10,8 @@ import ( "strings" ) -//Command describes a command that can be run using the methods in the -//Implementation interface. +// Command describes a command that can be run using the methods in the +// Implementation interface. type Command struct { Program []string WorkDir string @@ -34,12 +34,12 @@ func (e commandError) Error() string { ) } -//CommandRunner is a function that can execute commands given to it. -//This interface is only useful for unit tests; the default CommandRunner -//suffices for all regular operation. +// CommandRunner is a function that can execute commands given to it. +// This interface is only useful for unit tests; the default CommandRunner +// suffices for all regular operation. type CommandRunner func(c Command, stdin io.Reader, stdout, stderr io.Writer) error -//DefaultCommandRunner is a CommandRunner that actually executes the command. +// DefaultCommandRunner is a CommandRunner that actually executes the command. func DefaultCommandRunner(c Command, stdin io.Reader, stdout, stderr io.Writer) error { cmd := exec.Command(c.Program[0], c.Program[1:]...) cmd.Stdin = stdin -- cgit v1.3.1