Skip to content

Commit

Permalink
Update name repository and unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Cataldo committed Jan 4, 2024
1 parent b2c536c commit ce3af21
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 59 deletions.
73 changes: 37 additions & 36 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions _example/consumer/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"github.com/GabrielHCataldo/go-aws-sqs/sqs"
"github.com/GabrielHCataldo/go-aws-sqs/sqs/option"
"github.com/GabrielHCataldo/go-aws-sqs-template/sqs"
"github.com/GabrielHCataldo/go-aws-sqs-template/sqs/option"
"github.com/GabrielHCataldo/go-logger/logger"
"os"
"os/signal"
Expand Down
4 changes: 2 additions & 2 deletions _example/producer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package main

import (
"context"
"github.com/GabrielHCataldo/go-aws-sqs/sqs"
"github.com/GabrielHCataldo/go-aws-sqs/sqs/option"
"github.com/GabrielHCataldo/go-aws-sqs-template/sqs"
"github.com/GabrielHCataldo/go-aws-sqs-template/sqs/option"
"github.com/GabrielHCataldo/go-logger/logger"
"os"
"time"
Expand Down
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/GabrielHCataldo/go-aws-sqs
module github.com/GabrielHCataldo/go-aws-sqs-template

go 1.21.3

Expand Down
6 changes: 3 additions & 3 deletions sqs/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package sqs
import (
"context"
"fmt"
"github.com/GabrielHCataldo/go-aws-sqs/internal/client"
"github.com/GabrielHCataldo/go-aws-sqs/internal/util"
"github.com/GabrielHCataldo/go-aws-sqs/sqs/option"
"github.com/GabrielHCataldo/go-aws-sqs-template/internal/client"
"github.com/GabrielHCataldo/go-aws-sqs-template/internal/util"
"github.com/GabrielHCataldo/go-aws-sqs-template/sqs/option"
"github.com/aws/aws-sdk-go-v2/service/sqs"
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
"reflect"
Expand Down
4 changes: 2 additions & 2 deletions sqs/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package sqs
import (
"context"
"errors"
"github.com/GabrielHCataldo/go-aws-sqs/sqs/option"
"github.com/GabrielHCataldo/go-aws-sqs-template/sqs/option"
"github.com/GabrielHCataldo/go-logger/logger"
"os"
"strconv"
Expand Down Expand Up @@ -1093,5 +1093,5 @@ func cancelMessageMoveTaskTest() {
}

func getSqsCreateQueueTest() string {
return "go-aws-sqs-test-create-queue-" + strconv.Itoa(int(time.Now().UnixNano()))
return "go-aws-sqs-template-test-create-queue-" + strconv.Itoa(int(time.Now().UnixNano()))
}
6 changes: 3 additions & 3 deletions sqs/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package sqs

import (
"context"
"github.com/GabrielHCataldo/go-aws-sqs/internal/client"
"github.com/GabrielHCataldo/go-aws-sqs/internal/util"
"github.com/GabrielHCataldo/go-aws-sqs/sqs/option"
"github.com/GabrielHCataldo/go-aws-sqs-template/internal/client"
"github.com/GabrielHCataldo/go-aws-sqs-template/internal/util"
"github.com/GabrielHCataldo/go-aws-sqs-template/sqs/option"
"github.com/aws/aws-sdk-go-v2/service/sqs"
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
"time"
Expand Down
2 changes: 1 addition & 1 deletion sqs/option/producer.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package option

import (
"github.com/GabrielHCataldo/go-aws-sqs/internal/util"
"github.com/GabrielHCataldo/go-aws-sqs-template/internal/util"
"reflect"
"time"
)
Expand Down
14 changes: 7 additions & 7 deletions sqs/producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package sqs
import (
"context"
"errors"
"github.com/GabrielHCataldo/go-aws-sqs/internal/client"
"github.com/GabrielHCataldo/go-aws-sqs/internal/util"
"github.com/GabrielHCataldo/go-aws-sqs/sqs/option"
"github.com/GabrielHCataldo/go-aws-sqs-template/internal/client"
"github.com/GabrielHCataldo/go-aws-sqs-template/internal/util"
"github.com/GabrielHCataldo/go-aws-sqs-template/sqs/option"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/sqs"
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
Expand Down Expand Up @@ -187,16 +187,16 @@ func convertReflectToMessageAttributeValue(v reflect.Value) *types.MessageAttrib
if v.Kind() == reflect.Pointer || v.Kind() == reflect.Interface {
v = v.Elem()
}
result := types.MessageAttributeValue{}
var result *types.MessageAttributeValue
dataType := util.GetDataType(v.Interface())
result.DataType = &dataType
if dataType == "String" || dataType == "Number" {
result = &types.MessageAttributeValue{}
result.DataType = &dataType
strValue := util.ConvertToString(v.Interface())
if len(strValue) == 0 {
return nil
}
result.StringValue = &strValue
return &result
}
return nil
return result
}
4 changes: 2 additions & 2 deletions sqs/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package sqs

import (
"context"
"github.com/GabrielHCataldo/go-aws-sqs/internal/client"
"github.com/GabrielHCataldo/go-aws-sqs/sqs/option"
"github.com/GabrielHCataldo/go-aws-sqs-template/internal/client"
"github.com/GabrielHCataldo/go-aws-sqs-template/sqs/option"
"github.com/aws/aws-sdk-go-v2/service/sqs"
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
)
Expand Down

0 comments on commit ce3af21

Please sign in to comment.