Skip to content

Commit ce3af21

Browse files
author
Gabriel Cataldo
committed
Update name repository and unit tests
1 parent b2c536c commit ce3af21

File tree

10 files changed

+60
-59
lines changed

10 files changed

+60
-59
lines changed

README.md

+37-36
Large diffs are not rendered by default.

_example/consumer/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"github.com/GabrielHCataldo/go-aws-sqs/sqs"
5-
"github.com/GabrielHCataldo/go-aws-sqs/sqs/option"
4+
"github.com/GabrielHCataldo/go-aws-sqs-template/sqs"
5+
"github.com/GabrielHCataldo/go-aws-sqs-template/sqs/option"
66
"github.com/GabrielHCataldo/go-logger/logger"
77
"os"
88
"os/signal"

_example/producer/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package main
22

33
import (
44
"context"
5-
"github.com/GabrielHCataldo/go-aws-sqs/sqs"
6-
"github.com/GabrielHCataldo/go-aws-sqs/sqs/option"
5+
"github.com/GabrielHCataldo/go-aws-sqs-template/sqs"
6+
"github.com/GabrielHCataldo/go-aws-sqs-template/sqs/option"
77
"github.com/GabrielHCataldo/go-logger/logger"
88
"os"
99
"time"

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/GabrielHCataldo/go-aws-sqs
1+
module github.com/GabrielHCataldo/go-aws-sqs-template
22

33
go 1.21.3
44

sqs/consumer.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package sqs
33
import (
44
"context"
55
"fmt"
6-
"github.com/GabrielHCataldo/go-aws-sqs/internal/client"
7-
"github.com/GabrielHCataldo/go-aws-sqs/internal/util"
8-
"github.com/GabrielHCataldo/go-aws-sqs/sqs/option"
6+
"github.com/GabrielHCataldo/go-aws-sqs-template/internal/client"
7+
"github.com/GabrielHCataldo/go-aws-sqs-template/internal/util"
8+
"github.com/GabrielHCataldo/go-aws-sqs-template/sqs/option"
99
"github.com/aws/aws-sdk-go-v2/service/sqs"
1010
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
1111
"reflect"

sqs/main_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package sqs
33
import (
44
"context"
55
"errors"
6-
"github.com/GabrielHCataldo/go-aws-sqs/sqs/option"
6+
"github.com/GabrielHCataldo/go-aws-sqs-template/sqs/option"
77
"github.com/GabrielHCataldo/go-logger/logger"
88
"os"
99
"strconv"
@@ -1093,5 +1093,5 @@ func cancelMessageMoveTaskTest() {
10931093
}
10941094

10951095
func getSqsCreateQueueTest() string {
1096-
return "go-aws-sqs-test-create-queue-" + strconv.Itoa(int(time.Now().UnixNano()))
1096+
return "go-aws-sqs-template-test-create-queue-" + strconv.Itoa(int(time.Now().UnixNano()))
10971097
}

sqs/message.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ package sqs
22

33
import (
44
"context"
5-
"github.com/GabrielHCataldo/go-aws-sqs/internal/client"
6-
"github.com/GabrielHCataldo/go-aws-sqs/internal/util"
7-
"github.com/GabrielHCataldo/go-aws-sqs/sqs/option"
5+
"github.com/GabrielHCataldo/go-aws-sqs-template/internal/client"
6+
"github.com/GabrielHCataldo/go-aws-sqs-template/internal/util"
7+
"github.com/GabrielHCataldo/go-aws-sqs-template/sqs/option"
88
"github.com/aws/aws-sdk-go-v2/service/sqs"
99
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
1010
"time"

sqs/option/producer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package option
22

33
import (
4-
"github.com/GabrielHCataldo/go-aws-sqs/internal/util"
4+
"github.com/GabrielHCataldo/go-aws-sqs-template/internal/util"
55
"reflect"
66
"time"
77
)

sqs/producer.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package sqs
33
import (
44
"context"
55
"errors"
6-
"github.com/GabrielHCataldo/go-aws-sqs/internal/client"
7-
"github.com/GabrielHCataldo/go-aws-sqs/internal/util"
8-
"github.com/GabrielHCataldo/go-aws-sqs/sqs/option"
6+
"github.com/GabrielHCataldo/go-aws-sqs-template/internal/client"
7+
"github.com/GabrielHCataldo/go-aws-sqs-template/internal/util"
8+
"github.com/GabrielHCataldo/go-aws-sqs-template/sqs/option"
99
"github.com/aws/aws-sdk-go-v2/aws"
1010
"github.com/aws/aws-sdk-go-v2/service/sqs"
1111
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
@@ -187,16 +187,16 @@ func convertReflectToMessageAttributeValue(v reflect.Value) *types.MessageAttrib
187187
if v.Kind() == reflect.Pointer || v.Kind() == reflect.Interface {
188188
v = v.Elem()
189189
}
190-
result := types.MessageAttributeValue{}
190+
var result *types.MessageAttributeValue
191191
dataType := util.GetDataType(v.Interface())
192-
result.DataType = &dataType
193192
if dataType == "String" || dataType == "Number" {
193+
result = &types.MessageAttributeValue{}
194+
result.DataType = &dataType
194195
strValue := util.ConvertToString(v.Interface())
195196
if len(strValue) == 0 {
196197
return nil
197198
}
198199
result.StringValue = &strValue
199-
return &result
200200
}
201-
return nil
201+
return result
202202
}

sqs/queue.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package sqs
22

33
import (
44
"context"
5-
"github.com/GabrielHCataldo/go-aws-sqs/internal/client"
6-
"github.com/GabrielHCataldo/go-aws-sqs/sqs/option"
5+
"github.com/GabrielHCataldo/go-aws-sqs-template/internal/client"
6+
"github.com/GabrielHCataldo/go-aws-sqs-template/sqs/option"
77
"github.com/aws/aws-sdk-go-v2/service/sqs"
88
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
99
)

0 commit comments

Comments
 (0)