Skip to content

Commit 8fccb82

Browse files
committed
no longer exporting types, functions, fields that were not intended for export
1 parent 0c1d37f commit 8fccb82

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

injectionapi/injectionResponseDto.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package injectionapi
22

3-
type InjectionResponseDto struct {
3+
type injectionResponseDto struct {
44
ErrorCode string
55
TransactionReceipt string
6-
MessageResults []MessageResultDto
6+
MessageResults []messageResultDto
77
}

injectionapi/injectionResponseParser.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import (
66
"net/http"
77
)
88

9-
type InjectionResponseParser struct {
9+
type injectionResponseParser struct {
1010
}
1111

12-
func (parser InjectionResponseParser) Parse(resp *http.Response) (SendResponse, error) {
12+
func (parser injectionResponseParser) Parse(resp *http.Response) (SendResponse, error) {
1313
//read body into byte array
1414
body, err := ioutil.ReadAll(resp.Body)
1515
defer resp.Body.Close()
@@ -18,13 +18,13 @@ func (parser InjectionResponseParser) Parse(resp *http.Response) (SendResponse,
1818
}
1919

2020
//deserialize
21-
var injectionResponse InjectionResponseDto
21+
var injectionResponse injectionResponseDto
2222
err = json.Unmarshal(body, &injectionResponse)
2323
if err != nil {
2424
return SendResponse{}, err
2525
}
2626

27-
var sendResult = DetermineSendResult(injectionResponse.ErrorCode, resp.StatusCode)
27+
var sendResult = determineSendResult(injectionResponse.ErrorCode, resp.StatusCode)
2828
newResponse := SendResponse{
2929
Result: sendResult,
3030
TransactionReceipt: injectionResponse.TransactionReceipt,
@@ -45,7 +45,7 @@ func (parser InjectionResponseParser) Parse(resp *http.Response) (SendResponse,
4545
return newResponse, nil
4646
}
4747

48-
func DetermineSendResult(errorCode string, statusCode int) SendResult {
48+
func determineSendResult(errorCode string, statusCode int) SendResult {
4949
switch statusCode {
5050
case 200:
5151
sendResult := SendResultSUCCESS.Parse(errorCode)

injectionapi/messageResultDto.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package injectionapi
22

3-
type MessageResultDto struct {
3+
type messageResultDto struct {
44
Index int
55
ErrorCode string
66
AddressResults []AddressResult

injectionapi/socketlabsclient.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func (socketlabsClient socketlabsClient) sendInjectionRequest(injectionRequest *
153153

154154
//add headers
155155
req.Header.Set("Content-Type", "application/json")
156-
req.Header.Set("User-Agent", "socketlabs-go/1.0.0 ("+runtime.Version()+")")
156+
req.Header.Set("User-Agent", "socketlabs-go/1.0.1 ("+runtime.Version()+")")
157157

158158
//create http client
159159
client, err := socketlabsClient.createHttpClient(socketlabsClient.ProxyURL)
@@ -168,7 +168,7 @@ func (socketlabsClient socketlabsClient) sendInjectionRequest(injectionRequest *
168168
}
169169

170170
//map to response and return
171-
return InjectionResponseParser{}.Parse(resp)
171+
return injectionResponseParser{}.Parse(resp)
172172
}
173173

174174
func (socketlabsClient *socketlabsClient) createHttpClient(proxyUrl string) (*http.Client, error) {

0 commit comments

Comments
 (0)