diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..fb7940c --- /dev/null +++ b/.env.example @@ -0,0 +1,5 @@ +FJ_HOST=https://your-forgejo-instance.com +FJ_USERNAME="username" +FJ_API_TOKEN=your-api-token-here +FJ_SSH_KEY_PATH="/home/youruser/.ssh/id_ed25519" +FJ_SSH_USER="username" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 432502c..9cfd07c 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,6 @@ go.work.sum # env file .env .envrc + +# compiled binary +fj \ No newline at end of file diff --git a/README.md b/README.md index 69ffb70..4b5f1d9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,18 @@ # fj -A Forgejo CLI - "gh for Forgejo" \ No newline at end of file +A Forgejo CLI - "gh for Forgejo" + +## Configuration + +The application can be configured using environment variables or a .env file. Create a copy of `.env.example` as `.env` and modify the values: + +```bash +cp .env.example .env +``` + +Required variables: +- `FJ_HOST`: Your Forgejo instance URL +- `FJ_API_TOKEN`: Your Forgejo API token +- `FJ_SSH_KEY_PATH`: Path to your SSH key + +Environment variables take precedence over values in the .env file. \ No newline at end of file diff --git a/fj.go b/fj.go index 289c263..7602b77 100644 --- a/fj.go +++ b/fj.go @@ -1,13 +1,19 @@ package main import ( + "bytes" "encoding/json" + "flag" + "fmt" "log" - "os" - "net/http" - // "github.com/go-git/go-git/v5" - // "github.com/go-git/go-git/v5/storage/memory" + "os" + "strings" + + "github.com/joho/godotenv" + + "github.com/go-git/go-git/v5" + "github.com/go-git/go-git/v5/plumbing/transport/ssh" ) type ForgejoRepository struct { @@ -19,8 +25,30 @@ type ForgejoRepository struct { CloneURL string `json:"clone_url"` } -var API_URL = "/api/v1" -var API_USER_REPOS = "/user/repos" +const ( + API_URL = "/api/v1" + API_USER_REPOS = "/user/repos" + API_CREATE_REPO = "/user/repos" + API_DELETE_REPO = "/repos/%s/%s" +) + +func showHelp() { + fmt.Println("fj - A Forgejo CLI") + fmt.Println("\nUsage:") + fmt.Println(" fj [arguments]") + fmt.Println("\nAvailable Commands:") + fmt.Println(" list List all accessible repositories") + fmt.Println(" clone Clone a repository to the specified directory") + fmt.Println(" create Create a new repository") + fmt.Println(" delete Delete an existing repository") + fmt.Println(" help Show this help message") + fmt.Println("\nEnvironment Variables:") + fmt.Println(" FJ_HOST Forgejo instance URL") + fmt.Println(" FJ_USERNAME Username to use for repository operations") + fmt.Println(" FJ_API_TOKEN Forgejo API token") + fmt.Println(" FJ_SSH_KEY_PATH Path to SSH key for git operations") + fmt.Println(" FJ_SSH_USER Username to use for SSH git operations") +} func buildApiUrl(host string, token string, api string) string { return host + API_URL + api + "?token=" + token + "&limit=1000" @@ -30,26 +58,40 @@ func buildApiUrlUserRepos(host string, token string) string { return buildApiUrl(host, token, API_USER_REPOS) } -func main() { - // Get the environment variables for Forgejo URL and api token - FJ_HOST := os.Getenv("FJ_HOST") - FJ_API_TOKEN := os.Getenv("FJ_API_TOKEN") +func buildApiUrlCreateRepo(host string, token string) string { + return buildApiUrl(host, token, API_CREATE_REPO) +} - if FJ_HOST == "" || FJ_API_TOKEN == "" { - log.Fatalln("Please configure the FJ_HOST and FJ_API_TOKEN environment variables to use fj.") - return +func buildApiUrlDeleteRepo(host string, token string, username string, reponame string) string { + return buildApiUrl(host, token, fmt.Sprintf(API_DELETE_REPO, username, reponame)) +} + +func findRepo(repos []ForgejoRepository, name string) *ForgejoRepository { + for _, repo := range repos { + if repo.Name == name { + return &repo + } } + return nil +} - // Get the master repo list from Forgejo by calling the user/repos endpoint - repos_json, err := http.Get(buildApiUrlUserRepos(FJ_HOST, FJ_API_TOKEN)) +func getRepos(host string, token string) ([]ForgejoRepository, error) { + repos_json, err := http.Get(buildApiUrlUserRepos(host, token)) if err != nil { - log.Fatalln(err) - return + return nil, err } - // Deserialize the json into a slice of Repository structs var repos []ForgejoRepository err = json.NewDecoder(repos_json.Body).Decode(&repos) + if err != nil { + return nil, err + } + + return repos, nil +} + +func listRepos(host string, token string) { + repos, err := getRepos(host, token) if err != nil { log.Fatalln(err) return @@ -59,3 +101,205 @@ func main() { log.Println(repo.Name + " " + repo.CloneURL) } } + +func cloneRepo(host string, token string, sshUser string, keyPath string, repoName string, directory string) { + repos, err := getRepos(host, token) + if err != nil { + log.Fatalln(err) + return + } + + repo := findRepo(repos, repoName) + if repo == nil { + log.Fatalf("Repository '%s' not found\n", repoName) + return + } + + publicKeys, err := ssh.NewPublicKeysFromFile(sshUser, keyPath, "") + if err != nil { + log.Fatalf("Failed to load SSH key: %v\n", err) + return + } + + _, err = git.PlainClone(directory, false, &git.CloneOptions{ + URL: repo.SSHURL, + Progress: os.Stdout, + Auth: publicKeys, + }) + + if err != nil { + log.Fatalf("Failed to clone repository: %v\n", err) + return + } + + fmt.Printf("Successfully cloned %s to %s\n", repoName, directory) +} + +func createRepo(host string, token string, repoName string) error { + // Confirm with user + fmt.Printf("Are you sure you want to create repository '%s'? (y/N): ", repoName) + var response string + fmt.Scanln(&response) + if strings.ToLower(response) != "y" { + return fmt.Errorf("repository creation cancelled") + } + + // Prepare request body + reqBody := map[string]interface{}{ + "name": repoName, + "private": true, + } + jsonBody, err := json.Marshal(reqBody) + if err != nil { + return err + } + + // Create POST request + url := buildApiUrlCreateRepo(host, token) + req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonBody)) + if err != nil { + return err + } + req.Header.Set("Content-Type", "application/json") + + // Send request + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + return err + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusCreated { + return fmt.Errorf("failed to create repository. Status: %s", resp.Status) + } + + fmt.Printf("Repository '%s' created successfully\n", repoName) + + repos, err := getRepos(host, token) + if err != nil { + log.Fatalln(err) + return err + } + + repo := findRepo(repos, repoName) + if repo == nil { + log.Fatalf("Repository '%s' not found\n", repoName) + return err + } + + // print the repo ssh clone url + fmt.Printf("SSH clone URL: %s\n", repo.SSHURL) + + return nil +} + +func deleteRepo(host string, token string, username string, repoName string) error { + // First confirmation + fmt.Printf("Are you sure you want to delete repository '%s'? (y/N): ", repoName) + var response string + fmt.Scanln(&response) + if strings.ToLower(response) != "y" { + return fmt.Errorf("repository deletion cancelled") + } + + // Second confirmation with warning + color := "\033[31m" // Red color + reset := "\033[0m" // Reset color + fmt.Printf("%sWARNING: This will permanently delete all data in '%s'. This action cannot be undone!\nType the repository name to confirm: %s", color, repoName, reset) + var confirmation string + fmt.Scanln(&confirmation) + if confirmation != repoName { + return fmt.Errorf("repository deletion cancelled - name mismatch") + } + + // Create DELETE request + url := buildApiUrlDeleteRepo(host, token, username, repoName) + req, err := http.NewRequest("DELETE", url, nil) + if err != nil { + return err + } + + // Send request + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + return err + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusNoContent { + return fmt.Errorf("failed to delete repository. Status: %s", resp.Status) + } + + fmt.Printf("Repository '%s' deleted successfully\n", repoName) + return nil +} + +func main() { + // Get the environment variables for Forgejo URL and api token + FJ_HOST := os.Getenv("FJ_HOST") + FJ_USERNAME := os.Getenv("FJ_USERNAME") + FJ_API_TOKEN := os.Getenv("FJ_API_TOKEN") + FJ_SSH_KEY_PATH := os.Getenv("FJ_SSH_KEY_PATH") + FJ_SSH_USER := os.Getenv("FJ_SSH_USER") + + if FJ_HOST == "" || FJ_USERNAME == "" || FJ_API_TOKEN == "" || FJ_SSH_KEY_PATH == "" || FJ_SSH_USER == "" { + if err := godotenv.Load(); err != nil { + log.Fatalln("Please configure the FJ_HOST, FJ_API_TOKEN, FJ_SSH_KEY_PATH and FJ_SSH_USER environment variables to use fj.") + return + } + + FJ_HOST = os.Getenv("FJ_HOST") + FJ_USERNAME = os.Getenv("FJ_USERNAME") + FJ_API_TOKEN = os.Getenv("FJ_API_TOKEN") + FJ_SSH_KEY_PATH = os.Getenv("FJ_SSH_KEY_PATH") + FJ_SSH_USER = os.Getenv("FJ_SSH_USER") + } + + flag.Parse() + command := "" + if flag.NArg() > 0 { + command = flag.Arg(0) + } + + switch command { + case "list": + listRepos(FJ_HOST, FJ_API_TOKEN) + case "clone": + if flag.NArg() != 3 { + log.Fatalln("Usage: fj clone ") + return + } + repoName := flag.Arg(1) + directory := flag.Arg(2) + cloneRepo(FJ_HOST, FJ_API_TOKEN, FJ_SSH_USER, FJ_SSH_KEY_PATH, repoName, directory) + case "create": + if flag.NArg() != 2 { + log.Fatalln("Usage: fj create ") + return + } + repoName := flag.Arg(1) + if err := createRepo(FJ_HOST, FJ_API_TOKEN, repoName); err != nil { + log.Fatalln(err) + } + case "delete": + if flag.NArg() != 2 { + log.Fatalln("Usage: fj delete ") + return + } + repoName := flag.Arg(1) + if FJ_USERNAME == "" { + log.Fatalln("Please set FJ_USERNAME environment variable") + return + } + if err := deleteRepo(FJ_HOST, FJ_API_TOKEN, FJ_USERNAME, repoName); err != nil { + log.Fatalln(err) + } + case "help": + showHelp() + default: + showHelp() + os.Exit(1) + } +} diff --git a/go.mod b/go.mod index ec45cb2..c1cc860 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,33 @@ module tehga.me/forgejo/wasp/fj go 1.23.4 + +require ( + github.com/go-git/go-git/v5 v5.13.2 + github.com/joho/godotenv v1.5.1 +) + +require ( + dario.cat/mergo v1.0.0 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/ProtonMail/go-crypto v1.1.5 // indirect + github.com/cloudflare/circl v1.3.7 // indirect + github.com/cyphar/filepath-securejoin v0.3.6 // indirect + github.com/emirpasic/gods v1.18.1 // indirect + github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect + github.com/go-git/go-billy/v5 v5.6.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect + github.com/kevinburke/ssh_config v1.2.0 // indirect + github.com/pjbgf/sha1cd v0.3.2 // indirect + github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect + github.com/skeema/knownhosts v1.3.0 // indirect + github.com/xanzy/ssh-agent v0.3.3 // indirect + golang.org/x/crypto v0.32.0 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.34.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.29.0 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + gopkg.in/warnings.v0 v0.1.2 // indirect +) diff --git a/go.sum b/go.sum index e69de29..61d307e 100644 --- a/go.sum +++ b/go.sum @@ -0,0 +1,110 @@ +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/ProtonMail/go-crypto v1.1.5 h1:eoAQfK2dwL+tFSFpr7TbOaPNUbPiJj4fLYwwGE1FQO4= +github.com/ProtonMail/go-crypto v1.1.5/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= +github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= +github.com/cyphar/filepath-securejoin v0.3.6 h1:4d9N5ykBnSp5Xn2JkhocYDkOpURL/18CYMpo6xB9uWM= +github.com/cyphar/filepath-securejoin v0.3.6/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/elazarl/goproxy v1.4.0 h1:4GyuSbFa+s26+3rmYNSuUVsx+HgPrV1bk1jXI0l9wjM= +github.com/elazarl/goproxy v1.4.0/go.mod h1:X/5W/t+gzDyLfHW4DrMdpjqYjpXsURlBt9lpBDxZZZQ= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= +github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c= +github.com/gliderlabs/ssh v0.3.8/go.mod h1:xYoytBv1sV0aL3CavoDuJIQNURXkkfPA/wxQ1pL1fAU= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= +github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM= +github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= +github.com/go-git/go-git/v5 v5.13.2 h1:7O7xvsK7K+rZPKW6AQR1YyNhfywkv7B8/FsP3ki6Zv0= +github.com/go-git/go-git/v5 v5.13.2/go.mod h1:hWdW5P4YZRjmpGHwRH2v3zkWcNl6HeXaXQEMGb3NJ9A= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= +github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= +github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= +github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= +github.com/pjbgf/sha1cd v0.3.2 h1:a9wb0bp1oC2TGwStyn0Umc/IGKQnEgF0vVaZ8QF8eo4= +github.com/pjbgf/sha1cd v0.3.2/go.mod h1:zQWigSxVmsHEZow5qaLtPYxpcKMMQpa09ixqBxuCS6A= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= +github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/skeema/knownhosts v1.3.0 h1:AM+y0rI04VksttfwjkSTNQorvGqmwATnvnAHpSgc0LY= +github.com/skeema/knownhosts v1.3.0/go.mod h1:sPINvnADmT/qYH1kfv+ePMmOBTH6Tbl7b5LvTDjFK7M= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= +golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= +golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= +golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=