modulepackage
0.0.0-20231113012710-05a631772bd3
Repository: https://github.com/staticaland/strangler.git
Documentation: pkg.go.dev
# README
Strangler
Introduction
strangler
is a Go-based tool designed to incrementally replace functionality in a Bash script, inspired by the Strangler Fig pattern. This approach is particularly useful for transitioning from simple Bash scripts to more robust, scalable Go programs while preserving existing functionality.
Features
- Subcommand Flexibility: Easily define new subcommands in Go to extend script functionality.
- Integrated Bash Script: Leverage existing Bash scripts within the Go binary for a seamless transition.
- Argument Passing: Pass arguments from Go commands to the Bash script, maintaining script compatibility.
Installation
Prerequisites
- Go (version 1.16 or later)
- Bash
- Git (for cloning the repository)
Steps
-
Clone the repository:
git clone [repository-url]
-
Navigate to the project directory:
cd strangler
-
Build the project:
go build -o strangler
Usage
Run the strangler
binary with the desired subcommand. The two initial subcommands are:
hello
: Executes the Bash script logic associated with "hello".dawg
: Executes the Bash script logic associated with "dawg".
Examples
./strangler hello
./strangler dawg