Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gbbr/uselocal
https://github.com/gbbr/uselocal
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/gbbr/uselocal
- Owner: gbbr
- Created: 2023-06-22T08:32:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-21T09:36:42.000Z (over 1 year ago)
- Last Synced: 2024-06-20T20:55:04.098Z (5 months ago)
- Language: Go
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# uselocal
The `uselocal` tool helps you switch between development and production environments for module (and sub-module) repositories by programmatically applying and undoing replace directives.
## Usage
The configuration file is located by default in the current folder where the command is run under the name `.uselocal.yaml`, but can be placed anywhere and set via the `USELOCAL` variable.
An example configuration file would be:
```yaml
targets:
- ./cmd/otelcontribcol
- ./exporter/datadogexporter
- ./processor/datadogprocessor
- .
replace:
- from: github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics
to: ../../DataDog/opentelemetry-mapping-go/pkg/otlp/metrics
- from: github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes
to: ../../DataDog/opentelemetry-mapping-go/pkg/otlp/attributes
- from: github.com/DataDog/datadog-agent/pkg/trace
to: ../../DataDog/datadog-agent/pkg/trace
```This file specifies that for the `go.mod` files in the subfolders specified in `targets`, the list of replace directives is applied.
To apply the changes, run `uselocal`. To undo the changes, run `uselocal --drop`.