Skip to content

Commit

Permalink
fix: Fixing cache tracing and etag determinism
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Oct 8, 2022
1 parent e1b9f5e commit 9d09e86
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 15 deletions.
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ module github.com/ViBiOh/fibr
go 1.19

require (
github.com/ViBiOh/ChatPotte v0.2.19
github.com/ViBiOh/ChatPotte v0.2.20
github.com/ViBiOh/absto v1.0.8
github.com/ViBiOh/auth/v2 v2.14.13
github.com/ViBiOh/exas v0.5.9
github.com/ViBiOh/auth/v2 v2.14.14
github.com/ViBiOh/exas v0.5.10
github.com/ViBiOh/flags v1.2.0
github.com/ViBiOh/httputils/v4 v4.49.1
github.com/ViBiOh/vith v0.5.8
github.com/ViBiOh/httputils/v4 v4.49.2
github.com/ViBiOh/vith v0.5.9
github.com/golang/mock v1.6.0
github.com/prometheus/client_golang v1.13.0
github.com/streadway/amqp v1.0.0
Expand Down
20 changes: 10 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/ViBiOh/ChatPotte v0.2.19 h1:xcxhIT+CCPdw4a0jAXhca2B9ooZVIU3QI8LhLbMHCtU=
github.com/ViBiOh/ChatPotte v0.2.19/go.mod h1:SElMgTZ5scOhcOhLwGr4uCFGh0pa+koF2ZeKfMir6jc=
github.com/ViBiOh/ChatPotte v0.2.20 h1:bOz1bWW/iHd2b6GK+qVxEAyKL1sFVWYsGy2CGPYMcC4=
github.com/ViBiOh/ChatPotte v0.2.20/go.mod h1:sFEs4hdT913butnpO9WvPcOa5V6D0eDsgUotgT1vGSI=
github.com/ViBiOh/absto v1.0.8 h1:v7o4zVZJ1idcSm6VqztSI2joMvTPszjtY3E/3d/4qPc=
github.com/ViBiOh/absto v1.0.8/go.mod h1:PpNf1Ajiwdd2lZ93WEsA09QaGlRFauFRVibeTn0TV54=
github.com/ViBiOh/auth/v2 v2.14.13 h1:loY0kFhOQdPcRN9v1/Q8giMrApqKkk6AmCUcAqLn3xU=
github.com/ViBiOh/auth/v2 v2.14.13/go.mod h1:8kXjlZHTyHfmz3CR2CjWwu+v/K1YBR1K+534nBq3ye4=
github.com/ViBiOh/exas v0.5.9 h1:dwpQymqpgj6eF3R/0eSwSrVGmYy9rEQEBQnjDLRjeNc=
github.com/ViBiOh/exas v0.5.9/go.mod h1:LQnD3TNq5fEKGaRPmOGM9sNre6/4XQ8f5YN8E5YHVJQ=
github.com/ViBiOh/auth/v2 v2.14.14 h1:Elf6o+++ve8B+/FGzGoYkHLN5hfAtRMEofOiEUf+Ma4=
github.com/ViBiOh/auth/v2 v2.14.14/go.mod h1:1SBIphdyBILdPLkN+e2skTHxnLltF5ONdHlsQ1vPYuo=
github.com/ViBiOh/exas v0.5.10 h1:bo/4Fq8jW5AnzEs6psSFMMoKi8+YIRv2RTmo09liRTw=
github.com/ViBiOh/exas v0.5.10/go.mod h1:Mh7OS/EZFHOXFa4JbuJI/X5skos50DZ2wYlOitrCQ+8=
github.com/ViBiOh/flags v1.2.0 h1:DaujjNXzD29KxKyp4eZdn7c9+uBN5DokWgDAe7DcUmc=
github.com/ViBiOh/flags v1.2.0/go.mod h1:UyMB5zeD/aId7Xw3x7577ZNU298JmukzOcV8p/H2W1s=
github.com/ViBiOh/httputils/v4 v4.49.1 h1:DOri21C9cGmNWW22cX+oVCfCx/PFA16odSx2SQ86Dfg=
github.com/ViBiOh/httputils/v4 v4.49.1/go.mod h1:az+bpwxGelymOsvdp0ZUNbGXdkjjjQXTuKIMFT78bmY=
github.com/ViBiOh/vith v0.5.8 h1:XsUncmXyU2QgKA7/2Y4ORO3QadWS+QtmdTDZFz0qf8Q=
github.com/ViBiOh/vith v0.5.8/go.mod h1:3EAucQgm3HwV1lvlObJuzrqxsNm2dA/YYglYfUA2i5A=
github.com/ViBiOh/httputils/v4 v4.49.2 h1:sfchcv1EWexucawsIP1Ik/HfWtXORoa0arMjNvUaM1A=
github.com/ViBiOh/httputils/v4 v4.49.2/go.mod h1:az+bpwxGelymOsvdp0ZUNbGXdkjjjQXTuKIMFT78bmY=
github.com/ViBiOh/vith v0.5.9 h1:VI+Yk5qwh1zh2rUEKcEZXlRYNhuHrSFX311OIifFqlk=
github.com/ViBiOh/vith v0.5.9/go.mod h1:YgkWoK44IX5CGFfohCpoaM7HltD7mgr805huqUM+Czg=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
Expand Down
32 changes: 32 additions & 0 deletions pkg/crud/list_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package crud

import (
"fmt"
"testing"

"github.com/ViBiOh/fibr/pkg/provider"
)

func BenchmarkContentString(b *testing.B) {
content := map[string]any{
"Files": []provider.RenderItem{},
"Cover": cover{},
"Request": provider.Request{
Path: "/path/to/file",
Item: "file",
Display: "grid",
Preferences: provider.Preferences{},
Share: provider.Share{},
CanEdit: true,
CanShare: false,
CanWebhook: false,
},
"Message": "Hello world",
"HasMap": true,
"HasThumbnail": false,
}

for i := 0; i < b.N; i++ {
_ = fmt.Sprintf("%v", content)
}
}

0 comments on commit 9d09e86

Please sign in to comment.