mirror of
https://github.com/FJurmanovic/wallet-go-api.git
synced 2026-02-06 06:08:16 +00:00
added documentation comments to methods
This commit is contained in:
@@ -2,13 +2,15 @@ package migrate
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/go-pg/pg/v10"
|
||||
"log"
|
||||
"wallet-api/pkg/models"
|
||||
|
||||
"github.com/go-pg/pg/v10"
|
||||
|
||||
"github.com/go-pg/pg/v10/orm"
|
||||
)
|
||||
|
||||
// Creates api table if it does not exist.
|
||||
func CreateTableApi(db pg.DB) error {
|
||||
|
||||
models := []interface{}{
|
||||
@@ -20,10 +22,10 @@ func CreateTableApi(db pg.DB) error {
|
||||
IfNotExists: true,
|
||||
})
|
||||
if err != nil {
|
||||
log.Printf("Error Creating Table: %s", err)
|
||||
log.Printf("Error creating table \"api\": %s", err)
|
||||
return err
|
||||
} else {
|
||||
fmt.Println("Table created successfully")
|
||||
fmt.Println("Table \"api\" created successfully")
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user