Files
cpdaily_xiaozhushou/backed/cmd/verify_pwd/main.go
T
becomer 2e2c161770 feat: init cpdaily-xiaozhushou with blue-green deploy
- backed/: Go Fiber backend with cpdaily integration
- frondend/: Vue 3 + Vite frontend
- Dockerfile: multi-stage build (Node → Go → Alpine)
- deploy/docker-compose.yml: production compose file
- .woodpecker/build.yml: CI/CD with blue-green zero-downtime deploy
- /health endpoint for deployment health checks
- Port 8884/8885 blue-green swap via 1Panel OpenResty
2026-07-03 15:37:55 +08:00

26 lines
557 B
Go

package main
import (
"cpdaily-new/internal/config"
"cpdaily-new/internal/database"
"cpdaily-new/internal/model"
"fmt"
"log"
"golang.org/x/crypto/bcrypt"
)
func main() {
if err := config.Load(""); err != nil {
log.Fatal(err)
}
database.Init()
var agent model.AgentUser
database.DB.Where("username = ?", "becomer").First(&agent)
err := bcrypt.CompareHashAndPassword([]byte(agent.Password), []byte("baca122..."))
if err == nil {
fmt.Println("✅ 密码验证通过: baca122...")
} else {
fmt.Println("❌ 密码验证失败:", err)
}
}