INNER CODE UNIT · Go
main
gabrie30/ghorg · scripts/local-gitea/seeder/main.go:257
func main() {
var (
token = flag.String("token", "", "Gitea API token")
username = flag.String("username", "", "Admin username for basic auth")
password = flag.String("password", "", "Admin password for basic auth")
baseURL = flag.String("base-url", "http://gitea.example.com:3000", "Gitea base URL")
configPath = flag.String("config", "configs/seed-data.json", "Path to seed data configuration file")
)
flag.Parse()
if *token == "" && (*username == "" || *password == "") {
log.Fatal("Either token or username+password is required")
}
// If username and password are provided, we'll use them in NewGiteaSeeder
if *username != "" && *password != "" {
log.Printf("Using basic authentication with username: %s", *username)
}