1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

remove "import const" everywhere

This commit is contained in:
Alexander Medvednikov
2019-08-23 00:00:31 +03:00
parent dcfc9eb1a1
commit f61b14584a
11 changed files with 172 additions and 308 deletions

View File

@@ -18,10 +18,6 @@ pub:
vals []string
}
import const (
CONNECTION_OK
)
struct C.PGResult { }
struct Config {
@@ -41,7 +37,7 @@ pub fn connect(config pg.Config) DB {
conninfo := 'host=$config.host user=$config.user dbname=$config.dbname'
conn:=C.PQconnectdb(conninfo.str)
status := C.PQstatus(conn)
if status != CONNECTION_OK {
if status != C.CONNECTION_OK {
error_msg := C.PQerrorMessage(conn)
eprintln('Connection to a PG database failed: ' + string(error_msg))
exit(1)