{"id":16473294,"url":"https://github.com/amalfra/oexec","last_synced_at":"2025-03-21T06:32:15.712Z","repository":{"id":57509211,"uuid":"100781944","full_name":"amalfra/oexec","owner":"amalfra","description":"oexec is a Go package to execute shell commands in specified order","archived":false,"fork":false,"pushed_at":"2024-04-09T11:14:09.000Z","size":22,"stargazers_count":23,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-17T22:15:22.936Z","etag":null,"topics":["cmd","exec","go","golang","order","package","shell"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amalfra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-19T08:44:18.000Z","updated_at":"2024-04-15T07:49:25.000Z","dependencies_parsed_at":"2024-04-09T12:29:36.513Z","dependency_job_id":"13bdcb48-a682-4569-bf53-552bec027e57","html_url":"https://github.com/amalfra/oexec","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalfra%2Foexec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalfra%2Foexec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalfra%2Foexec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalfra%2Foexec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amalfra","download_url":"https://codeload.github.com/amalfra/oexec/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244751632,"owners_count":20504243,"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":["cmd","exec","go","golang","order","package","shell"],"created_at":"2024-10-11T12:26:10.496Z","updated_at":"2025-03-21T06:32:15.430Z","avatar_url":"https://github.com/amalfra.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"oexec\n=====\n[![GitHub release](https://img.shields.io/github/release/amalfra/oexec.svg)](https://github.com/amalfra/oexec/releases)\n![Build Status](https://github.com/amalfra/oexec/actions/workflows/test.yml/badge.svg?branch=main)\n[![GoDoc](https://godoc.org/github.com/amalfra/oexec/v3?status.svg)](https://godoc.org/github.com/amalfra/oexec/v3)\n[![Go Report Card](https://goreportcard.com/badge/github.com/amalfra/oexec/v3)](https://goreportcard.com/report/github.com/amalfra/oexec/v3)\n[![Coverage Status](https://coveralls.io/repos/github/amalfra/oexec/badge.svg?branch=main)](https://coveralls.io/github/amalfra/oexec?branch=main)\n\nA go package to execute shell commands in specified order. Currently supports executing list of shell commands in following orders:\n* Series\n* Parallel\n\n## Installation\nYou can download the package using\n```sh\ngo get github.com/amalfra/oexec/v3\n```\n## Usage\nNext, import the package\n``` go\nimport (\n  \"github.com/amalfra/oexec/v3\"\n)\n```\nYou can execute list of shell commands in following orders:\n* Series\n* Parallel\n\nThe result of each command will be returned as ```oexec.Output``` struct which has fields\n* Stdout - a ```byte``` array containing stdout produced by the command. Will be nil if command status is non zero\n* Stderr - an ```error``` object containing stderr returned by the command. Will be nil if command status is zero  \n\n### executing in series\nTo execute commands in series call the function as\n``` go\noexec.Series(\"ls -l\", \"pwd\")\n```\nYou can pass any number of commands to execute as parameters. All the passed commands will get executed in series and results will be return once all of them are completed. The results are returned as an array of ```oexec.Output``` struct, having the result corresponding to a command at same position of argument as in Series function call(position starts are zero)\n\n### executing in parallel\n\u003e Note: Precisely the commands will be executed concurrently unless configured otherwise via ```GOMAXPROCS``` environment variable and depending on underlying hardware\n\nTo execute commands in parallel call the function as\n``` go\noexec.Parallel(\"ls -l\", \"pwd\")\n```\nYou can pass any number of commands to execute as parameters. All the passed commands will get executed in parallel and results will be return once all of them are completed. The results are returned as an array of ```oexec.Output``` struct, having the result corresponding to a command at same position of argument as in Series function call(position starts are zero)\n\n## Development\n\nQuestions, problems or suggestions? Please post them on the [issue tracker](https://github.com/amalfra/oexec/issues).\n\nYou can contribute changes by forking the project and submitting a pull request. You can ensure the tests are passing by running ```make test```. Feel free to contribute :heart_eyes:\n\n## UNDER MIT LICENSE\n\nThe MIT License (MIT)\n\nCopyright (c) 2017 Amal Francis\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famalfra%2Foexec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famalfra%2Foexec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famalfra%2Foexec/lists"}