Files
mttools/go-util/README.md
T
tiennm99 0be94abc75 refactor: rename to gitea-delete-orgs and delete orgs instead of leaving
Use DELETE /api/v1/orgs/{org} to fully delete organizations
rather than just removing the user as a member.
2026-04-13 09:41:06 +07:00

699 B

go-util

Some useful (or useless) scripts written in Go.

Structure

Each script lives in its own directory under cmd/, so multiple main packages coexist without conflicts.

cmd/
  gitea-delete-orgs/   # Delete all Gitea orgs except a keep-list

Usage

# Run any script
go run ./cmd/<script-name>

# Example: delete Gitea orgs
export GITEA_URL=https://gitea.example.com
export GITEA_TOKEN=your-token
export GITEA_KEEP_ORGS=org1,org2
go run ./cmd/gitea-delete-orgs

Adding a new script

Create a new directory under cmd/ with its own main.go:

mkdir cmd/my-new-script
# write cmd/my-new-script/main.go with `package main`
go run ./cmd/my-new-script