Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/njkevlani/gobundle
gobundle - Bundle a go file with external dependencies in a single standalone executable go file.
https://github.com/njkevlani/gobundle
competitive-programming golang
Last synced: 3 months ago
JSON representation
gobundle - Bundle a go file with external dependencies in a single standalone executable go file.
- Host: GitHub
- URL: https://github.com/njkevlani/gobundle
- Owner: njkevlani
- Created: 2020-06-05T02:11:21.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-07T14:09:10.000Z (6 months ago)
- Last Synced: 2024-06-21T10:58:30.972Z (5 months ago)
- Topics: competitive-programming, golang
- Language: Go
- Homepage:
- Size: 148 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gobundle
**Caution:** `gobundle` is in alpha phase. It will work some cases and will fail
for many more cases. If `gobundle` does not work for some of your use case, feel free
to raise an issue with minimal sample to reprodue the issue. PRs are welcomed
and appreciated. Check [Development guidelines](#development-guidelines) for
more info on development.---
A CLI tool to copy code from dependencies and bundle it into a single go file.
What issue does this solve?
In competitive programming, you are supposed to submit a single source code file.
This results in adding some boilerplate code in all the files.Instead, you can write modular code with go modules and use `gobundle` at the
end to bundle entire code into a single file that you can submit.Check [test\_project0/main.go](./test_files/test_project0/main.go) and code generated with `gobundle` at
[expected\_output0/main.go](./test_files/expected_output0/main.go) for example.## Installation
### Binaries
Download binary from [latest release](https://github.com/njkevlani/gobundle/releases/latest).### From source code
```shell
make install
```Make sure your `$GOPATH/bin` is part of `$PATH` environment variable.
## Usage
```shell
$ gobundle -h
version: gobundle-dev
usage: gobundle [-h] file.gofile.go path to input go file.
-h show this message.
``````shell
$ gobundle target_file.go
```This will save output to `./build/main.go`.
## Development guidelines
To build `gobundle`:
```shell
make build
```To run tests:
```shell
make test
```To install `gobundle` from source:
```shell
make install
```