{"id":25021006,"url":"https://github.com/excoriate/daggerx","last_synced_at":"2025-07-03T22:05:39.695Z","repository":{"id":239931662,"uuid":"800957419","full_name":"Excoriate/daggerx","owner":"Excoriate","description":"DaggerX is a Go package 📦 that helps you avoid DRY while developing Dagger modules.","archived":false,"fork":false,"pushed_at":"2025-05-06T15:23:17.000Z","size":784,"stargazers_count":8,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-03T22:05:24.138Z","etag":null,"topics":["cli","devops","ecs","example","sre","tooling"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Excoriate.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-15T10:22:24.000Z","updated_at":"2025-05-06T15:22:07.000Z","dependencies_parsed_at":"2024-05-16T02:26:14.904Z","dependency_job_id":"2557263f-65a4-4003-ad19-6fff6deaae76","html_url":"https://github.com/Excoriate/daggerx","commit_stats":null,"previous_names":["excoriate/daggerx"],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/Excoriate/daggerx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Excoriate%2Fdaggerx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Excoriate%2Fdaggerx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Excoriate%2Fdaggerx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Excoriate%2Fdaggerx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Excoriate","download_url":"https://codeload.github.com/Excoriate/daggerx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Excoriate%2Fdaggerx/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263410762,"owners_count":23462297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","devops","ecs","example","sre","tooling"],"created_at":"2025-02-05T12:18:37.944Z","updated_at":"2025-07-03T22:05:39.632Z","avatar_url":"https://github.com/Excoriate.png","language":"Go","readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg alt=\"logo\" src=\"img/logo.png\" width=\"450px\"/\u003e\u003cbr/\u003e\n\u003c/h1\u003e\n\u003cp align=\"center\"\u003eA collection of utility functions that works well when using \u003ca href=\"https://www.dagger.io/\"\u003eDagger\u003c/a\u003e and  \u003ca href=\"https://golang.org/\"\u003eGo\u003c/a\u003e\u003cbr/\u003e\u003cbr/\u003e\n\n---\n[![Go Reference](https://pkg.go.dev/badge/github.com/Excoriate/daggerx.svg)](https://pkg.go.dev/github.com/Excoriate/daggerx)\n[![Contributors](https://img.shields.io/github/contributors/badges/shields)](https://github.com/Excoriate/daggerx/graphs/contributors)\n[![Activity](https://img.shields.io/github/commit-activity/m/Excoriate/daggerx)](https://github.com/Excoriate/daggerx/pulse)\n\n## Why 🤔\n\nThis library is a set of reusable functions that can be used when developing [Dagger](https://www.dagger.io/) modules or functions using [Go](https://golang.org/). The objective is to speed up the development process and make it easier to write Dagger modules using Go.\n\n\n## Installation 🛠️\n\nInstall it using [Go get](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them):\n\n```bash\ngo get github.com/Excoriate/daggerx\n```\n\n### Pre-requisites 📋\n\n- [Go](https://golang.org/doc/install) \u003e= ~1.22\n\n\u003e**NOTE**: For the tools used in this project, please check the [Makefile](./Makefile), and the [Taskfile](./Taskfile.yml) files. You'll also need [pre-commit](https://pre-commit.com/) installed.\n\n---\n\n\n## Usage 🚀\n\n### Convert map to slice of DaggerEnvVars\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/Excoriate/daggerx/pkg/envvars\"\n    \"github.com/Excoriate/daggerx/pkg/types\"\n)\n\nfunc main() {\n    envVarsMap := map[string]string{\n        \"key1\": \"value1\",\n        \"key2\": \"value2\",\n        \"key3\": \"value3\",\n    }\n\n    envVarsSlice, err := envvars.ToDaggerEnvVarsFromMap(envVarsMap)\n    if err != nil {\n        fmt.Println(\"Error:\", err)\n        return\n    }\n\n    fmt.Println(\"Environment Variables Slice:\", envVarsSlice)\n}\n\n```\n\n### Generate validated Dagger commands\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/Excoriate/daggerx/pkg/execmd\"\n)\n\nfunc main() {\n    cmd, err := execmd.GenerateCommand(\"terraform\", \"plan\", \"-var\", \"foo=bar\")\n    if err != nil {\n        fmt.Println(\"Error:\", err)\n        return\n    }\n\n    fmt.Println(\"Generated Command:\", *cmd)\n}\n```\n\n### Convert slice of key=value strings to slice of DaggerEnvVars\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/Excoriate/daggerx/pkg/envvars\"\n    \"github.com/Excoriate/daggerx/pkg/types\"\n)\n\nfunc main() {\n    envVarsSlice := []string{\"key1=value1\", \"key2=value2\", \"key3=value3\"}\n\n    daggerEnvVarsSlice, err := envvars.ToDaggerEnvVarsFromSlice(envVarsSlice)\n    if err != nil {\n        fmt.Println(\"Error:\", err)\n        return\n    }\n\n    fmt.Println(\"Dagger Environment Variables Slice:\", daggerEnvVarsSlice)\n}\n\n```\n\n## Contributing\n\nPlease read our [contributing guide](./CONTRIBUTING.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcoriate%2Fdaggerx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexcoriate%2Fdaggerx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcoriate%2Fdaggerx/lists"}