https://github.com/root27/go-sql
Package provides easy sql connection
https://github.com/root27/go-sql
Last synced: about 2 months ago
JSON representation
Package provides easy sql connection
- Host: GitHub
- URL: https://github.com/root27/go-sql
- Owner: root27
- License: gpl-3.0
- Created: 2023-06-14T07:24:01.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-21T08:58:03.000Z (almost 3 years ago)
- Last Synced: 2025-02-27T11:47:07.666Z (over 1 year ago)
- Language: Go
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Go Sql
---
### Description
This is simple package to connect sql database
### Usage Example
```go
package main
import (
"fmt"
"github.com/root27/go-sql"
)
func main() {
db,err := sql_connection.ConnectDB("sql") // sql is the name in the .env file
if err != nil {
fmt.Println(err)
}
defer sql_connection.CloseDB(db) //Close db
//Ping db
sql_connection.PingDB(db)
fmt.Println("Connected to DB")
}