Skip to content

Commit

Permalink
all: rename ssaplayground
Browse files Browse the repository at this point in the history
  • Loading branch information
changkun committed Apr 5, 2020
1 parent 0670169 commit 776b2fa
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/changkun/gossafunc
module github.com/changkun/ssaplayground

go 1.14

Expand Down
14 changes: 7 additions & 7 deletions src/boot/boot.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"os/signal"
"time"

"github.com/changkun/gossafunc/src/config"
"github.com/changkun/gossafunc/src/route"
"github.com/changkun/ssaplayground/src/config"
"github.com/changkun/ssaplayground/src/route"
"github.com/sirupsen/logrus"
)

Expand All @@ -29,23 +29,23 @@ func Run() {
signal.Notify(quit, os.Interrupt, os.Kill)
sig := <-quit

logrus.Info("gossaweb: service is stopped with signal: ", sig)
logrus.Info("ssaplayground: service is stopped with signal: ", sig)

ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
if err := server.Shutdown(ctx); err != nil {
logrus.Errorf("gossaweb: close gossaweb with error: %v", err)
logrus.Errorf("ssaplayground: close ssaplayground with error: %v", err)
}

cancel()
terminated <- true
}()

logrus.Infof("gossaweb: welcome to gossaweb service... http://%s/gossa", config.Get().Addr)
logrus.Infof("ssaplayground: welcome to ssaplayground service... http://%s/gossa", config.Get().Addr)
err := server.ListenAndServe()
if err != http.ErrServerClosed {
logrus.Info("gossaweb: launch with error: ", err)
logrus.Info("ssaplayground: launch with error: ", err)
}

<-terminated
logrus.Info("gossaweb: service has terminated successfully, good bye!")
logrus.Info("ssaplayground: service has terminated successfully, good bye!")
}
4 changes: 2 additions & 2 deletions src/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ func Get() *Config {
}

func Init() {
c := flag.String("conf", "", "path to the gossaweb config file")
c := flag.String("conf", "", "path to the ssaplayground config file")
usage := func() {
fmt.Fprintf(os.Stderr, `
GOSSAWEB is a web service for exploring Go's SSA intermediate representation.
SSAPLAYGROUND is a web service for exploring Go's SSA intermediate representation.
Usage:
`)
flag.PrintDefaults()
Expand Down
2 changes: 1 addition & 1 deletion src/route/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"runtime"
"strings"

"github.com/changkun/gossafunc/src/config"
"github.com/changkun/ssaplayground/src/config"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
)
Expand Down
2 changes: 1 addition & 1 deletion src/route/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net/http"
"net/http/pprof"

"github.com/changkun/gossafunc/src/config"
"github.com/changkun/ssaplayground/src/config"
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
)
Expand Down
2 changes: 1 addition & 1 deletion src/route/static.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"path"
"strings"

"github.com/changkun/gossafunc/src/config"
"github.com/changkun/ssaplayground/src/config"
"github.com/gin-gonic/gin"
)

Expand Down
2 changes: 1 addition & 1 deletion ssaplayground.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package main

import "github.com/changkun/gossafunc/src/boot"
import "github.com/changkun/ssaplayground/src/boot"

func main() {
boot.Run()
Expand Down

0 comments on commit 776b2fa

Please sign in to comment.