Download goalert/devtools/waitfor/schemapostgres.go from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 404 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/goalert/devtools/waitfor/schemapostgres.go
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/goalert/devtools/waitfor/schemapostgres.go
-
curl -L -o schemapostgres.go https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/goalert/devtools/waitfor/schemapostgres.go
404 Bytes
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "github.com/jackc/pgx/v5" | |
| ) | |
| func init() { | |
| register(func(ctx context.Context, connStr string) error { | |
| conn, err := pgx.Connect(ctx, connStr) | |
| if err != nil { | |
| return fmt.Errorf("connect: %w", err) | |
| } | |
| defer conn.Close(ctx) | |
| err = conn.Ping(ctx) | |
| if err != nil { | |
| return fmt.Errorf("ping: %w", err) | |
| } | |
| return nil | |
| }, "postgres", "postgresql") | |
| } | |