package main import ( "fmt" "github.com/joho/godotenv" "os" ) // 失败! func main() { k := godotenv.Load() if k != nil { fmt.Println(k) } dbUser := os.Getenv("aaa") fmt.Print(dbUser) }