Apply go fix -any ./...

This commit is contained in:
Michael Eischer
2026-07-22 22:25:18 +02:00
parent d4088aa09b
commit 32e9869cc8
63 changed files with 197 additions and 197 deletions
+3 -3
View File
@@ -54,7 +54,7 @@ func NewFactory() location.Factory {
return location.NewLimitedBackendFactory("sftp", ParseConfig, location.NoPassword, limiter.WrapBackendConstructor(Create), limiter.WrapBackendConstructor(Open))
}
func startClient(cfg Config, errorLog func(string, ...interface{})) (*SFTP, error) {
func startClient(cfg Config, errorLog func(string, ...any)) (*SFTP, error) {
program, args, err := buildSSHCommand(cfg)
if err != nil {
return nil, err
@@ -147,7 +147,7 @@ func (r *SFTP) clientError() error {
// Open opens an sftp backend as described by the config by running
// "ssh" with the appropriate arguments (or cfg.Command, if set).
func Open(_ context.Context, cfg Config, errorLog func(string, ...interface{})) (*SFTP, error) {
func Open(_ context.Context, cfg Config, errorLog func(string, ...any)) (*SFTP, error) {
debug.Log("open backend with config %#v", cfg)
sftp, err := startClient(cfg, errorLog)
@@ -273,7 +273,7 @@ func buildSSHCommand(cfg Config) (cmd string, args []string, err error) {
// Create creates an sftp backend as described by the config by running "ssh"
// with the appropriate arguments (or cfg.Command, if set).
func Create(ctx context.Context, cfg Config, errorLog func(string, ...interface{})) (*SFTP, error) {
func Create(ctx context.Context, cfg Config, errorLog func(string, ...any)) (*SFTP, error) {
sftp, err := startClient(cfg, errorLog)
if err != nil {
debug.Log("unable to start program: %v", err)
+2 -2
View File
@@ -82,7 +82,7 @@ func TestCreateSetsDirPermissions(t *testing.T) {
cfg := testConfig(filepath.Join(rtest.TempDir(t), "repo"))
be, err := sftp.Create(context.Background(), cfg, func(string, ...interface{}) {})
be, err := sftp.Create(context.Background(), cfg, func(string, ...any) {})
rtest.OK(t, err)
defer func() { rtest.OK(t, be.Close()) }()
@@ -108,7 +108,7 @@ func TestSaveSetsDirPermissions(t *testing.T) {
cfg := testConfig(filepath.Join(rtest.TempDir(t), "repo"))
be, err := sftp.Create(context.Background(), cfg, func(string, ...interface{}) {})
be, err := sftp.Create(context.Background(), cfg, func(string, ...any) {})
rtest.OK(t, err)
defer func() { rtest.OK(t, be.Close()) }()