-
Notifications
You must be signed in to change notification settings - Fork 117
/
Copy pathmain.go
35 lines (28 loc) · 1003 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2018 The SQLer Authors. All rights reserved.
// Use of this source code is governed by a Apache 2.0
// license that can be found in the LICENSE file.
package main
import (
"fmt"
"strconv"
"github.com/alash3al/go-color"
)
func main() {
fmt.Println(color.MagentaString(sqlerBrand))
fmt.Printf("⇨ sqler server version: %s \n", color.GreenString(sqlerVersion))
fmt.Printf("⇨ sqler used driver is %s \n", color.GreenString(*flagDBDriver))
fmt.Printf("⇨ sqler used dsn is %s \n", color.GreenString(*flagDBDSN))
fmt.Printf("⇨ sqler workers count: %s \n", color.GreenString(strconv.Itoa(*flagWorkers)))
fmt.Printf("⇨ sqler resp server available at: %s \n", color.GreenString(*flagRESPListenAddr))
fmt.Printf("⇨ sqler rest server available at: %s \n", color.GreenString(*flagRESTListenAddr))
err := make(chan error)
go (func() {
err <- initRESPServer()
})()
go (func() {
err <- initRESTServer()
})()
if err := <-err; err != nil {
color.Red(err.Error())
}
}