Skip to content

Commit d8251b4

Browse files
authored
Merge pull request #6 from friendsofgo/fix-output
Fix stdout
2 parents cd052db + 1cc6e0c commit d8251b4

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ WORKDIR = $(PWD)
33

44
# build CLI
55
LOCAL_TAG := $(shell git describe --tags --abbrev=0)
6-
LOCAL_BUILD := $(shell date +"%m-%d-%Y_%H_%M_%S")
7-
LOCAL_LDFLAGS = -s -X main.version=$(LOCAL_TAG) -X main.build=$(LOCAL_BUILD)
6+
LOCAL_LDFLAGS = -s -X main.version=$(LOCAL_TAG)
87

98
# coverage
109
COVERAGE_REPORT = coverage.txt

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ And it'll launch a `GraphiQL` server
9797
```bash
9898
$ graphiql
9999

100-
2018/11/24 17:10:36 GraphiQL run on http://localhost:4040...
100+
2018/11/24 17:10:36 GraphiQL run on http://localhost:4040/graphiql...
101101
2018/11/24 17:10:36 GraphQL endpoint http://localhost:8080/graphql
102102
2018/11/24 17:10:36 Use (ctrl+c) to terminate the execution
103103
```

cmd/graphiql/main.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
var (
1313
name = "graphiql"
1414
version = "undefined"
15-
build = "undefined"
15+
graphiqlEndpoint = "/graphiql"
1616
)
1717

1818
func main() {
@@ -24,12 +24,13 @@ func main() {
2424
flag.Parse()
2525

2626
if *showVersion {
27-
fmt.Printf("%s%s\n", name, version)
27+
fmt.Printf("%s %s\n", name, version)
2828
return
2929
}
3030

3131
if *showClientGraphiQLVersion {
3232
fmt.Println(graphiql.GraphiQLVersion)
33+
return
3334
}
3435

3536
run(*endpoint, *port)
@@ -41,10 +42,10 @@ func run(endpoint, port string) {
4142
panic(err)
4243
}
4344

44-
http.Handle("/graphiql", graphiqlHandler)
45+
http.Handle(graphiqlEndpoint, graphiqlHandler)
4546
httpAddr := ":" + port
4647

47-
log.Printf("GraphiQL run on http://localhost%s...\n", httpAddr)
48+
log.Printf("GraphiQL run on http://localhost%s%s...\n", httpAddr, graphiqlEndpoint)
4849
log.Printf("GraphQL endpoint %s\n", endpoint)
4950
log.Printf("Use (ctrl+c) to terminate the execution")
5051

0 commit comments

Comments
 (0)