Rename project module to cgnolink
This commit is contained in:
parent
a4cfa52e3e
commit
fca15187b2
7 changed files with 28 additions and 28 deletions
20
cmd/cgnolink/main.go
Normal file
20
cmd/cgnolink/main.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"cgnolink"
|
||||
"cgnolink/database"
|
||||
)
|
||||
|
||||
func main() {
|
||||
conf := cgnolink.NewConfig()
|
||||
|
||||
pool := database.Pool(conf)
|
||||
|
||||
if err := cgnolink.Migrate(pool); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
server := cgnolink.NewServer(conf, pool)
|
||||
|
||||
server.Logger.Fatal(server.Start(":8080"))
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"link"
|
||||
"link/database"
|
||||
)
|
||||
|
||||
func main() {
|
||||
conf := link.NewConfig()
|
||||
|
||||
pool := database.Pool(conf)
|
||||
|
||||
if err := link.Migrate(pool); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
server := link.NewServer(conf, pool)
|
||||
|
||||
server.Logger.Fatal(server.Start(":8080"))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue