8000 GitHub - vorosdev/autoip-go at refs/tags/v0.3.1
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

vorosdev/autoip-go

Repository files navigation

Proposed Structure: Clean and CLI-Friendly

autoip-go/
├── cmd/
│   └── autoip/
│       └── main.go                # Entry point, uses urfave/cli v3
├── commands/                      # Formerly 'cli' — all CLI handlers
│   ├── create.go
│   ├── update.go
│   ├── delete.go
│   ├── show.go
│   ├── test_notify.go
│   └── shared.go                  # Optional helpers for all commands
├── config/
│   └── config.go
├── cron/
│   └── cron.go
├── ip/
│   └── fetch.go
├── logger/
│   └── logger.go
├── noip/
│   └── update.go
├── notify/
│   └── notify.go
├── termcolor/                     # Former util/color.go
│   └── color.go
├── dist/                          # Built binaries go here
├── go.mod
├── go.sum
├── Makefile
└── README.md

📌 Why This Structure Works

Folder Responsibility
cmd/autoip Main app entry point, CLI bootstrapping (main.go)
commands/ Each file is a CLI command mapped via urfave/cli/v3
config/ Load, validate and access TOML/YAML/ENV config
logger/ Handles logging, stderr, waitgroups
ip/ Fetch public IP, validate IP format, etc.
noip/ Specific logic for interacting with No-IP
notify/ Email notification logic (SMTP, TLS, etc.)
cron/ Crontab creation, deletion, detection
termcolor/ Fancy output formatting, coloring

License

autoip is licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later).

See LICENSE for the full text.

0