Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e339780

Browse files
parveenkaradi
committed
packaging as boilingdata
1 parent ddc48f6 commit e339780

File tree

7 files changed

+18
-12
lines changed
  • api
    • query.go
  • cmd
    • main.go
  • go.mod
  • service
    • auth_user.go
    • query.go
    • sign_wss_url.go
  • wsclient
    • wss_client.go

7 files changed

+18
-12
lines changed

api/query.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
package api
22

33
import (
4+
"encoding/json"
45
"io/ioutil"
56
"net/http"
67

7-
"github.com/pavi6691/go-boilingdata/service"
8-
"github.com/pavi6691/go-boilingdata/wsclient"
8+
"github.com/boilingdata/go-boilingdata/service"
9+
"github.com/boilingdata/go-boilingdata/wsclient"
910
)
1011

1112
type Handler struct {
@@ -39,6 +40,11 @@ func (h *Handler) Query(w http.ResponseWriter, r *http.Request) {
3940
// Set response content type to JSON
4041
w.Header().Set("Content-Type", "application/json")
4142
// Write JSON response to the response body
42-
w.Write(response)
43+
responseJSON, err := json.MarshalIndent(response, "", " ")
44+
if err != nil {
45+
http.Error(w, "Could marshal response", http.StatusInternalServerError)
46+
return
47+
}
48+
w.Write(responseJSON)
4349

4450
}

cmd/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import (
44
"log"
55
"net/http"
66

7-
"github.com/pavi6691/go-boilingdata/api"
8-
"github.com/pavi6691/go-boilingdata/constants"
9-
"github.com/pavi6691/go-boilingdata/service"
10-
"github.com/pavi6691/go-boilingdata/wsclient"
7+
"github.com/boilingdata/go-boilingdata/api"
8+
"github.com/boilingdata/go-boilingdata/constants"
9+
"github.com/boilingdata/go-boilingdata/service"
10+
"github.com/boilingdata/go-boilingdata/wsclient"
1111
)
1212

1313
func main() {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/pavi6691/go-boilingdata
1+
module github.com/boilingdata/go-boilingdata
22

33
go 1.22.1
44

service/auth_user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/aws/aws-sdk-go/aws"
99
"github.com/aws/aws-sdk-go/aws/session"
1010
"github.com/aws/aws-sdk-go/service/cognitoidentityprovider"
11-
"github.com/pavi6691/go-boilingdata/constants"
11+
"github.com/boilingdata/go-boilingdata/constants"
1212
)
1313

1414
type Auth struct {

service/query.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"fmt"
66
"log"
77

8-
"github.com/pavi6691/go-boilingdata/wsclient"
8+
"github.com/boilingdata/go-boilingdata/wsclient"
99
)
1010

1111
type QueryService struct {

service/sign_wss_url.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/aws/aws-sdk-go/aws"
1515
"github.com/aws/aws-sdk-go/aws/credentials"
1616
v4 "github.com/aws/aws-sdk-go/aws/signer/v4"
17-
"github.com/pavi6691/go-boilingdata/constants"
17+
"github.com/boilingdata/go-boilingdata/constants"
1818
)
1919

2020
type AwsCredentials struct {

wsclient/wss_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"sync"
1010
"time"
1111

12+
"github.com/boilingdata/go-boilingdata/constants"
1213
"github.com/gorilla/websocket"
13-
"github.com/pavi6691/go-boilingdata/constants"
1414
)
1515

1616
// WSSClient represents the WebSocket client.

0 commit comments

Comments
(0)