You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: ssh.go
    path of file: ./repos/buildkit/client/connhelper/ssh
    
    the code of the file until where you have to start completion: // Package ssh provides connhelper for ssh://<SSH URL>
package ssh

import (
	"context"
	"net"
	"net/url"

	"github.com/docker/cli/cli/connhelper/commandconn"
	"github.com/moby/buildkit/client/connhelper"
	"github.com/pkg/errors"
)

func init() {
	connhelper.Register("ssh", Helper)
}

// Helper returns helper for connecting through an SSH URL.
func Helper(u *url.URL) (*connhelper.ConnectionHelper, error) {
	sp, err := SpecFromURL(u
    
func Helper(u *url.URL) (*connhelper.ConnectionHelper, error) {
	sp, err := SpecFromURL(u)
	if err != nil {
		return nil, err
	}
	return &connhelper.ConnectionHelper{
		ContextDialer: func(ctx context.Context, addr string) (net.Conn, error) {
			args := []string{}
			if sp.User != "" {
				args = append(args, "-l", sp.User)
			}
			if sp.Port != "" {
				args = append(args, "-p", sp.Port)
			}
			args = append(args, "--", sp.Host)
			args = append(args, "buildctl")
			if socket := sp.Socket; socket != "" {
				args = append(args, "--addr", "unix://"+socket)
			}
			args = append(args, "dial-stdio")
			// using background context because context remains active for the duration of the process, after dial has completed
			return commandconn.New(context.Background(), "ssh", args...)
		},
	}, nil
}