This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
packagesea
import(
"os"
"fmt"
"errors"
_"github.com/go-sql-driver/mysql"
"github.com/jmoiron/sqlx"
)
// ============= SEA ============
typeSeastruct{
db*sqlx.DB
}
funcConnect()(*Sea,error){
user:=os.Getenv("SEA_USER")
ifuser==""{
returnnil,errors.New("Не установлена переменная SEA_USER")
}
password:=os.Getenv("SEA_PASSWORD")
ifpassword==""{
returnnil,errors.New("Не установлена переменная SEA_PASSWORD")