Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ This is the Modular Go framework - a structured way to create modular applicatio
## Development Workflow

### Local Development Setup
1. Clone the repository: `git clone https://github.com/CrisisTextLine/modular.git`
1. Clone the repository: `git clone https://github.com/GoCodeAlone/modular.git`
2. Install Go 1.23.0 or later (toolchain uses 1.24.2)
3. Install golangci-lint: `go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest`
4. Run tests to verify setup: `go test ./... -v`
Expand Down Expand Up @@ -153,7 +153,7 @@ Working example applications:
### CLI Tool (`modcli`)
- Generate new modules: `modcli generate module --name MyModule`
- Generate configurations: `modcli generate config --name MyConfig`
- Install with: `go install github.com/CrisisTextLine/modular/cmd/modcli@latest`
- Install with: `go install github.com/GoCodeAlone/modular/cmd/modcli@latest`

### Debugging Tools
- Debug module interfaces: `modular.DebugModuleInterfaces(app, "module-name")`
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/auto-bump-modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ jobs:
[ -f "$mod" ] || continue
dir=$(dirname "$mod")
# If the require line exists with a version different from CORE, update via go mod edit (portable, avoids sed incompat)
if grep -q "github.com/CrisisTextLine/modular v" "$mod" && ! grep -q "github.com/CrisisTextLine/modular ${CORE}" "$mod"; then
(cd "$dir" && go mod edit -require=github.com/CrisisTextLine/modular@${CORE})
if grep -q "github.com/GoCodeAlone/modular v" "$mod" && ! grep -q "github.com/GoCodeAlone/modular ${CORE}" "$mod"; then
(cd "$dir" && go mod edit -require=github.com/GoCodeAlone/modular@${CORE})
UPDATED=1
fi
# Drop any replace directive pointing to local modular path to avoid accidental pinning
(cd "$dir" && go mod edit -dropreplace=github.com/CrisisTextLine/modular 2>/dev/null || true)
(cd "$dir" && go mod edit -dropreplace=github.com/GoCodeAlone/modular 2>/dev/null || true)
done
if [ "$UPDATED" = 0 ]; then
echo "No module files needed updating"
Expand Down Expand Up @@ -114,10 +114,10 @@ jobs:
run: |
set -euo pipefail
CORE=${{ steps.ver.outputs.core_version }}
OLD=$(git grep -h -o 'github.com/CrisisTextLine/modular v[0-9]\+\.[0-9]\+\.[0-9]\+' -- '*.md' | grep -v $CORE | head -n1 | awk '{print $1}' || true)
OLD=$(git grep -h -o 'github.com/GoCodeAlone/modular v[0-9]\+\.[0-9]\+\.[0-9]\+' -- '*.md' | grep -v $CORE | head -n1 | awk '{print $1}' || true)
# Replace any explicit old version with current in markdown examples
if [ -n "$OLD" ]; then
find . -name '*.md' -print0 | xargs -0 sed -i "" -E "s#github.com/CrisisTextLine/modular v[0-9]+\.[0-9]+\.[0-9]+#github.com/CrisisTextLine/modular ${CORE}#g" || find . -name '*.md' -print0 | xargs -0 sed -i -E "s#github.com/CrisisTextLine/modular v[0-9]+\.[0-9]+\.[0-9]+#github.com/CrisisTextLine/modular ${CORE}#g"
find . -name '*.md' -print0 | xargs -0 sed -i "" -E "s#github.com/GoCodeAlone/modular v[0-9]+\.[0-9]+\.[0-9]+#github.com/GoCodeAlone/modular ${CORE}#g" || find . -name '*.md' -print0 | xargs -0 sed -i -E "s#github.com/GoCodeAlone/modular v[0-9]+\.[0-9]+\.[0-9]+#github.com/GoCodeAlone/modular ${CORE}#g"
fi

- name: Create PR
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/bdd-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.0 pinned
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: CrisisTextLine/modular
slug: GoCodeAlone/modular
files: core-bdd-coverage.txt
flags: core-bdd
- name: Persist core BDD coverage artifact
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.0 pinned
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: CrisisTextLine/modular
slug: GoCodeAlone/modular
files: modules/${{ matrix.module }}/bdd-${{ matrix.module }}-coverage.txt
flags: bdd-${{ matrix.module }}
- name: Persist module BDD coverage artifact
Expand Down Expand Up @@ -203,7 +203,7 @@ jobs:
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.0 pinned
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: CrisisTextLine/modular
slug: GoCodeAlone/modular
files: merged-bdd-coverage.txt
flags: merged-bdd
- name: Persist merged BDD coverage artifact
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.0 pinned
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: CrisisTextLine/modular
slug: GoCodeAlone/modular
files: coverage.txt
flags: unit
- name: Upload unit coverage artifact
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.0 pinned
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: CrisisTextLine/modular
slug: GoCodeAlone/modular
directory: cmd/modcli/
files: cli-coverage.txt
flags: cli
Expand Down Expand Up @@ -192,7 +192,7 @@ jobs:
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.0 pinned
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: CrisisTextLine/modular
slug: GoCodeAlone/modular
files: total-coverage.txt
flags: total
fail_ci_if_error: true
4 changes: 2 additions & 2 deletions .github/workflows/cli-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:
- name: Build
run: |
cd cmd/modcli
go build -v -ldflags "-X github.com/CrisisTextLine/modular/cmd/modcli/cmd.Version=${{ needs.prepare.outputs.version }} -X github.com/CrisisTextLine/modular/cmd/modcli/cmd.Commit=${{ github.sha }} -X github.com/CrisisTextLine/modular/cmd/modcli/cmd.Date=$(date +'%Y-%m-%d')" -o ${{ matrix.artifact_name }}
go build -v -ldflags "-X github.com/GoCodeAlone/modular/cmd/modcli/cmd.Version=${{ needs.prepare.outputs.version }} -X github.com/GoCodeAlone/modular/cmd/modcli/cmd.Commit=${{ github.sha }} -X github.com/GoCodeAlone/modular/cmd/modcli/cmd.Date=$(date +'%Y-%m-%d')" -o ${{ matrix.artifact_name }}
shell: bash

- name: Upload artifact
Expand Down Expand Up @@ -252,7 +252,7 @@ jobs:
- name: Announce to Go proxy
run: |
VERSION="${{ needs.prepare.outputs.version }}"
MODULE_NAME="github.com/CrisisTextLine/modular/cmd/modcli"
MODULE_NAME="github.com/GoCodeAlone/modular/cmd/modcli"

GOPROXY=proxy.golang.org go list -m ${MODULE_NAME}@${VERSION}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ jobs:
# Check that replace directives point to correct paths
if ! grep -q "replace.*=> ../../" go.mod; then
echo "❌ Missing or incorrect replace directive in ${{ matrix.example }}/go.mod"
echo "Expected: replace github.com/CrisisTextLine/modular => ../../"
echo "Expected: replace github.com/GoCodeAlone/modular => ../../"
cat go.mod
exit 1
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/module-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,9 @@ jobs:

# Construct correct module path with version suffix for v2+
if [ "$MAJOR_VERSION" -ge 2 ]; then
MODULE_NAME="github.com/CrisisTextLine/modular/modules/${MODULE}/v${MAJOR_VERSION}"
MODULE_NAME="github.com/GoCodeAlone/modular/modules/${MODULE}/v${MAJOR_VERSION}"
else
MODULE_NAME="github.com/CrisisTextLine/modular/modules/${MODULE}"
MODULE_NAME="github.com/GoCodeAlone/modular/modules/${MODULE}"
fi

echo "Announcing ${MODULE_NAME}@${VERSION} to Go proxy..."
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/modules-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.0 pinned
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: CrisisTextLine/modular
slug: GoCodeAlone/modular
directory: modules/${{ matrix.module }}/
files: ${{ matrix.module }}-coverage.txt
flags: ${{ matrix.module }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ jobs:

# Construct correct module path with version suffix for v2+
if [ "$MAJOR_VERSION" -ge 2 ]; then
MODULE_NAME="github.com/CrisisTextLine/modular/v${MAJOR_VERSION}"
MODULE_NAME="github.com/GoCodeAlone/modular/v${MAJOR_VERSION}"
else
MODULE_NAME="github.com/CrisisTextLine/modular"
MODULE_NAME="github.com/GoCodeAlone/modular"
fi

GOPROXY=proxy.golang.org go list -m ${MODULE_NAME}@${CURR}
Expand Down Expand Up @@ -377,9 +377,9 @@ jobs:
MAJOR_VERSION="${VER#v}"
MAJOR_VERSION="${MAJOR_VERSION%%.*}"
if [ "$MAJOR_VERSION" -ge 2 ]; then
MOD_PATH="github.com/CrisisTextLine/modular/modules/${M}/v${MAJOR_VERSION}"
MOD_PATH="github.com/GoCodeAlone/modular/modules/${M}/v${MAJOR_VERSION}"
else
MOD_PATH="github.com/CrisisTextLine/modular/modules/${M}"
MOD_PATH="github.com/GoCodeAlone/modular/modules/${M}"
fi

if gh release view "$TAG" >/dev/null 2>&1; then
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,9 @@ jobs:

# Construct correct module path with version suffix for v2+
if [ "$MAJOR_VERSION" -ge 2 ]; then
MODULE_NAME="github.com/CrisisTextLine/modular/v${MAJOR_VERSION}"
MODULE_NAME="github.com/GoCodeAlone/modular/v${MAJOR_VERSION}"
else
MODULE_NAME="github.com/CrisisTextLine/modular"
MODULE_NAME="github.com/GoCodeAlone/modular"
fi

echo "Announcing ${MODULE_NAME}@${VERSION} to Go proxy..."
Expand Down
2 changes: 1 addition & 1 deletion API_CONTRACT_MANAGEMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ modcli contract extract .
modcli contract extract ./modules/auth

# Extract from remote package
modcli contract extract github.com/CrisisTextLine/modular
modcli contract extract github.com/GoCodeAlone/modular

# Save to file with verbose output
modcli contract extract . -o contract.json -v
Expand Down
8 changes: 4 additions & 4 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -968,8 +968,8 @@ import (
"fmt"
"os"

"github.com/CrisisTextLine/modular"
"github.com/CrisisTextLine/modular/modules/database"
"github.com/GoCodeAlone/modular"
"github.com/GoCodeAlone/modular/modules/database"
)

func main() {
Expand Down Expand Up @@ -1423,7 +1423,7 @@ The Modular framework provides several debugging utilities to help diagnose comm
Use `DebugModuleInterfaces` to check which interfaces a specific module implements:

```go
import "github.com/CrisisTextLine/modular"
import "github.com/GoCodeAlone/modular"

// Debug a specific module
modular.DebugModuleInterfaces(app, "your-module-name")
Expand Down Expand Up @@ -1534,7 +1534,7 @@ modular.CompareModuleInstances(originalModule, currentModule, "module-name")
For detailed analysis of why a module doesn't implement Startable:

```go
import "github.com/CrisisTextLine/modular"
import "github.com/GoCodeAlone/modular"

// Check specific module
modular.CheckModuleStartableImplementation(yourModule)
Expand Down
28 changes: 14 additions & 14 deletions GO_MODULE_VERSIONING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Go modules follow semantic versioning (semver) with a special requirement for ma

```go
// go.mod
module github.com/CrisisTextLine/modular
module github.com/GoCodeAlone/modular
```

Tags:
Expand All @@ -27,7 +27,7 @@ Tags:

```go
// go.mod for v2
module github.com/CrisisTextLine/modular/v2
module github.com/GoCodeAlone/modular/v2
```

Tags:
Expand Down Expand Up @@ -79,7 +79,7 @@ This two-step approach provides several benefits:
**Initial State (v1.x.x):**
```go
// modules/reverseproxy/go.mod
module github.com/CrisisTextLine/modular/modules/reverseproxy
module github.com/GoCodeAlone/modular/modules/reverseproxy
```

**Step 1: Trigger v2.0.0 Release**
Expand All @@ -99,15 +99,15 @@ When you trigger a release for v2.0.0, the workflow:
After merging the PR:
```go
// modules/reverseproxy/go.mod (now updated)
module github.com/CrisisTextLine/modular/modules/reverseproxy/v2
module github.com/GoCodeAlone/modular/modules/reverseproxy/v2
```

Re-run the same release workflow, and it will:
1. Detect module path is already correct for v2
2. Skip the PR creation
3. Create tag `modules/reverseproxy/v2.0.0`
4. Generate release with changelog
5. Announce `github.com/CrisisTextLine/modular/modules/reverseproxy/v2@v2.0.0` to Go proxy
5. Announce `github.com/GoCodeAlone/modular/modules/reverseproxy/v2@v2.0.0` to Go proxy

## Manual Version Updates

Expand All @@ -117,11 +117,11 @@ If you need to manually prepare for a v2+ release:

```bash
# 1. Update go.mod
sed -i 's|^module github.com/CrisisTextLine/modular$|module github.com/CrisisTextLine/modular/v2|' go.mod
sed -i 's|^module github.com/GoCodeAlone/modular$|module github.com/GoCodeAlone/modular/v2|' go.mod

# 2. Update import paths in all .go files (if any self-imports)
find . -name "*.go" -type f -not -path "*/modules/*" -not -path "*/examples/*" \
-exec sed -i 's|github.com/CrisisTextLine/modular"|github.com/CrisisTextLine/modular/v2"|g' {} +
-exec sed -i 's|github.com/GoCodeAlone/modular"|github.com/GoCodeAlone/modular/v2"|g' {} +

# 3. Run go mod tidy
go mod tidy
Expand All @@ -137,12 +137,12 @@ MODULE_NAME="reverseproxy" # Change this to your module name
MAJOR_VERSION="2" # Change to your target major version

# 1. Update go.mod
sed -i "s|^module github.com/CrisisTextLine/modular/modules/${MODULE_NAME}$|module github.com/CrisisTextLine/modular/modules/${MODULE_NAME}/v${MAJOR_VERSION}|" \
sed -i "s|^module github.com/GoCodeAlone/modular/modules/${MODULE_NAME}$|module github.com/GoCodeAlone/modular/modules/${MODULE_NAME}/v${MAJOR_VERSION}|" \
modules/${MODULE_NAME}/go.mod

# 2. Update import paths (if module has self-imports - rare)
find modules/${MODULE_NAME} -name "*.go" -type f \
-exec sed -i "s|github.com/CrisisTextLine/modular/modules/${MODULE_NAME}\"|github.com/CrisisTextLine/modular/modules/${MODULE_NAME}/v${MAJOR_VERSION}\"|g" {} +
-exec sed -i "s|github.com/GoCodeAlone/modular/modules/${MODULE_NAME}\"|github.com/GoCodeAlone/modular/modules/${MODULE_NAME}/v${MAJOR_VERSION}\"|g" {} +

# 3. Run go mod tidy
cd modules/${MODULE_NAME}
Expand All @@ -158,20 +158,20 @@ When using v2+ versions in your code:

```go
// For v1.x.x
import "github.com/CrisisTextLine/modular/modules/reverseproxy"
import "github.com/GoCodeAlone/modular/modules/reverseproxy"

// For v2.x.x
import "github.com/CrisisTextLine/modular/modules/reverseproxy/v2"
import "github.com/GoCodeAlone/modular/modules/reverseproxy/v2"

// For v3.x.x
import "github.com/CrisisTextLine/modular/modules/reverseproxy/v3"
import "github.com/GoCodeAlone/modular/modules/reverseproxy/v3"
```

In `go.mod`:
```go
require (
github.com/CrisisTextLine/modular/v2 v2.0.0
github.com/CrisisTextLine/modular/modules/reverseproxy/v2 v2.0.0
github.com/GoCodeAlone/modular/v2 v2.0.0
github.com/GoCodeAlone/modular/modules/reverseproxy/v2 v2.0.0
)
```

Expand Down
2 changes: 1 addition & 1 deletion PRIORITY_SYSTEM_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Modular framework now supports explicit priority control for configuration f
### Basic Usage

```go
import "github.com/CrisisTextLine/modular/feeders"
import "github.com/GoCodeAlone/modular/feeders"

// Add feeders with priority control
config.AddFeeder(feeders.NewYamlFeeder("config.yaml").WithPriority(50))
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# modular
Modular Go

[![GitHub License](https://img.shields.io/github/license/CrisisTextLine/modular)](https://github.com/CrisisTextLine/modular/blob/main/LICENSE)
[![Go Reference](https://pkg.go.dev/badge/github.com/CrisisTextLine/modular.svg)](https://pkg.go.dev/github.com/CrisisTextLine/modular)
[![CodeQL](https://github.com/CrisisTextLine/modular/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/CrisisTextLine/modular/actions/workflows/github-code-scanning/codeql)
[![Dependabot Updates](https://github.com/CrisisTextLine/modular/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/CrisisTextLine/modular/actions/workflows/dependabot/dependabot-updates)
[![CI](https://github.com/CrisisTextLine/modular/actions/workflows/ci.yml/badge.svg)](https://github.com/CrisisTextLine/modular/actions/workflows/ci.yml)
[![Modules CI](https://github.com/CrisisTextLine/modular/actions/workflows/modules-ci.yml/badge.svg)](https://github.com/CrisisTextLine/modular/actions/workflows/modules-ci.yml)
[![Examples CI](https://github.com/CrisisTextLine/modular/actions/workflows/examples-ci.yml/badge.svg)](https://github.com/CrisisTextLine/modular/actions/workflows/examples-ci.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/CrisisTextLine/modular)](https://goreportcard.com/report/github.com/CrisisTextLine/modular)
[![codecov](https://codecov.io/gh/CrisisTextLine/modular/graph/badge.svg?token=2HCVC9RTN8)](https://codecov.io/gh/CrisisTextLine/modular)
[![GitHub License](https://img.shields.io/github/license/GoCodeAlone/modular)](https://github.com/GoCodeAlone/modular/blob/main/LICENSE)
[![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular)
[![CodeQL](https://github.com/GoCodeAlone/modular/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/GoCodeAlone/modular/actions/workflows/github-code-scanning/codeql)
[![Dependabot Updates](https://github.com/GoCodeAlone/modular/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/GoCodeAlone/modular/actions/workflows/dependabot/dependabot-updates)
[![CI](https://github.com/GoCodeAlone/modular/actions/workflows/ci.yml/badge.svg)](https://github.com/GoCodeAlone/modular/actions/workflows/ci.yml)
[![Modules CI](https://github.com/GoCodeAlone/modular/actions/workflows/modules-ci.yml/badge.svg)](https://github.com/GoCodeAlone/modular/actions/workflows/modules-ci.yml)
[![Examples CI](https://github.com/GoCodeAlone/modular/actions/workflows/examples-ci.yml/badge.svg)](https://github.com/GoCodeAlone/modular/actions/workflows/examples-ci.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/GoCodeAlone/modular)](https://goreportcard.com/report/github.com/GoCodeAlone/modular)
[![codecov](https://codecov.io/gh/GoCodeAlone/modular/graph/badge.svg?token=2HCVC9RTN8)](https://codecov.io/gh/GoCodeAlone/modular)

## Testing

Expand Down Expand Up @@ -144,7 +144,7 @@ Visit the [examples directory](./examples/) for detailed documentation, configur
## Installation

```go
go get github.com/CrisisTextLine/modular
go get github.com/GoCodeAlone/modular
```

## Usage
Expand All @@ -155,7 +155,7 @@ go get github.com/CrisisTextLine/modular
package main

import (
"github.com/CrisisTextLine/modular"
"github.com/GoCodeAlone/modular"
"log/slog"
"os"
)
Expand Down Expand Up @@ -702,20 +702,20 @@ You can install the CLI tool using one of the following methods:
#### Using go install (recommended)

```bash
go install github.com/CrisisTextLine/modular/cmd/modcli@latest
go install github.com/GoCodeAlone/modular/cmd/modcli@latest
```

This will download, build, and install the latest version of the CLI tool directly to your GOPATH's bin directory, which should be in your PATH.

#### Download pre-built binaries

Download the latest release from the [GitHub Releases page](https://github.com/CrisisTextLine/modular/releases) and add it to your PATH.
Download the latest release from the [GitHub Releases page](https://github.com/GoCodeAlone/modular/releases) and add it to your PATH.

#### Build from source

```bash
# Clone the repository
git clone https://github.com/CrisisTextLine/modular.git
git clone https://github.com/GoCodeAlone/modular.git
cd modular/cmd/modcli

# Build the CLI tool
Expand Down
Loading
Loading