Skip to content

Commit

Permalink
Bug fix convert to string and validate type IsBytes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Cataldo committed Jan 30, 2024
1 parent 1c94dc0 commit 4a88567
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ MongoDB Template
<!--suppress ALL -->
<img align="right" src="gopher-mongo.png" alt="">

[![Project status](https://img.shields.io/badge/version-v1.1.8-vividgreen.svg)](https://github.com/GabrielHCataldo/go-mongo-template/releases/tag/v1.1.8)
[![Project status](https://img.shields.io/badge/version-v1.1.9-vividgreen.svg)](https://github.com/GabrielHCataldo/go-mongo-template/releases/tag/v1.1.9)
[![Go Report Card](https://goreportcard.com/badge/github.com/GabrielHCataldo/go-mongo-template)](https://goreportcard.com/report/github.com/GabrielHCataldo/go-mongo-template)
[![Coverage Status](https://coveralls.io/repos/GabrielHCataldo/go-mongo-template/badge.svg?branch=main&service=github)](https://coveralls.io/github/GabrielHCataldo/go-mongo?branch=main)
[![Open Source Helpers](https://www.codetriage.com/gabrielhcataldo/go-mongo-template/badges/users.svg)](https://www.codetriage.com/gabrielhcataldo/go-mongo)
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ module github.com/GabrielHCataldo/go-mongo-template
go 1.21.3

require (
github.com/GabrielHCataldo/go-errors v1.1.1
github.com/GabrielHCataldo/go-helper v1.3.5
github.com/GabrielHCataldo/go-logger v1.2.3
github.com/iancoleman/orderedmap v0.3.0
github.com/GabrielHCataldo/go-errors v1.1.2
github.com/GabrielHCataldo/go-helper v1.3.7
github.com/GabrielHCataldo/go-logger v1.2.4
go.mongodb.org/mongo-driver v1.13.1
)

Expand All @@ -17,6 +16,7 @@ require (
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.17.0 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/iancoleman/orderedmap v0.3.0 // indirect
github.com/klassmann/cpfcnpj v0.0.0-20200907140233-a595c5fd8de1 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/leekchan/accounting v1.0.0 // indirect
Expand Down
16 changes: 6 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
github.com/GabrielHCataldo/go-errors v1.1.1 h1:cbEJIfWRk44843wE8eVpyvr9F7zOn/AHD8xozF/RUkM=
github.com/GabrielHCataldo/go-errors v1.1.1/go.mod h1:rrwIP14EEGJ0N8BUpxuwHNM8auO5ZsVj9jGEj442ibo=
github.com/GabrielHCataldo/go-helper v1.3.5 h1:H8BOYT5mkfMExWuyzp4guetI8cjQ7idyhyCsJsym6iw=
github.com/GabrielHCataldo/go-helper v1.3.5/go.mod h1:+whI36aUg1BfvLpZWJ8j81+d5iPuxl58ApOJqTIliCU=
github.com/GabrielHCataldo/go-logger v1.2.1 h1:5pKq4449safXvGR5rYkq7Op2lGgqeDR4B87MTkwZaGY=
github.com/GabrielHCataldo/go-logger v1.2.1/go.mod h1:Q7+M9m9gu1MtgGiFkoYOHtobLLM/kJCPZVhszIJtsJ0=
github.com/GabrielHCataldo/go-logger v1.2.2 h1:+CFRBha2Pr7mwHpQrPI+4i+XX8J2WSFo7bNotZg7E8U=
github.com/GabrielHCataldo/go-logger v1.2.2/go.mod h1:Q7+M9m9gu1MtgGiFkoYOHtobLLM/kJCPZVhszIJtsJ0=
github.com/GabrielHCataldo/go-logger v1.2.3 h1:qkmmluuxsi5e2XZw6X4eU+fSr/cdlO/DvXxFKSGxH/k=
github.com/GabrielHCataldo/go-logger v1.2.3/go.mod h1:Q7+M9m9gu1MtgGiFkoYOHtobLLM/kJCPZVhszIJtsJ0=
github.com/GabrielHCataldo/go-errors v1.1.2 h1:pzfegYVLH6+7pUzymcSU2HreUWiahGTJCOz+FMtgqyQ=
github.com/GabrielHCataldo/go-errors v1.1.2/go.mod h1:tJH0y1gLoR8uJS5SeuMpBzmcasZpI00j/PnH4HXTHpE=
github.com/GabrielHCataldo/go-helper v1.3.7 h1:aAUdFNJJyx6YCx9q4+1qaO/jmBkztDwwZiLtnip0kcI=
github.com/GabrielHCataldo/go-helper v1.3.7/go.mod h1:+whI36aUg1BfvLpZWJ8j81+d5iPuxl58ApOJqTIliCU=
github.com/GabrielHCataldo/go-logger v1.2.4 h1:a0IrcAdBa0dh4UUvQEy2kGbif3gGzpvjmPA4nIJOEVA=
github.com/GabrielHCataldo/go-logger v1.2.4/go.mod h1:1Vn/557fErplbuV+1jT/5U4Xi6/8+6cyZaj8niSv2uA=
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
4 changes: 2 additions & 2 deletions mongo/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,9 @@ type testEmptyStruct struct {

func TestMain(t *testing.M) {
initMongoTemplate()
//clearCollection()
clearCollection()
t.Run()
//clearCollection()
clearCollection()
disconnectMongoTemplate()
}

Expand Down
1 change: 1 addition & 0 deletions mongo/template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ func TestTemplateFindPageable(t *testing.T) {
t.Log("err expected:", err)
} else {
var destContent []testStruct
_ = v.Decode(destContent)
_ = v.Content.Decode(destContent)
_ = v.Content.Decode(&destContent)
logger.Info("result pageable:", v)
Expand Down

0 comments on commit 4a88567

Please sign in to comment.