Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

vorosdev/autoip

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.

AltStyle によって変換されたページ (->オリジナル) /