An open API service indexing awesome lists of open source software.

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

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")
}