Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonpetgrave64 committed Sep 3, 2024
1 parent 5deab1b commit b0342eb
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 53 deletions.
28 changes: 4 additions & 24 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3Bum
github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ=
github.com/go-piv/piv-go v1.11.0 h1:5vAaCdRTFSIW4PeqMbnsDlUZ7odMYWnHBDGdmtU/Zhg=
github.com/go-piv/piv-go v1.11.0/go.mod h1:NZ2zmjVkfFaL/CF8cVQ/pXdXtuj110zEKGdJM6fJZZM=
github.com/go-rod/rod v0.116.1 h1:BDMZY3qm/14SmvHBV7DoFUhXeJ2MbUYgumQ88b+v2WE=
github.com/go-rod/rod v0.116.1/go.mod h1:3Ash9fYwznqz9S1uLQgQRStur4fCXjoxxGW+ym6TYjU=
github.com/go-rod/rod v0.116.2 h1:A5t2Ky2A+5eD/ZJQr1EfsQSe5rms5Xof/qj296e+ZqA=
github.com/go-rod/rod v0.116.2/go.mod h1:H+CMO9SCNc2TJ2WfrG+pKhITz57uGNYU43qYHh438Mg=
github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
Expand Down Expand Up @@ -330,8 +330,6 @@ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-containerregistry v0.20.0 h1:wRqHpOeVh3DnenOrPy9xDOLdnLatiGuuNRVelR2gSbg=
github.com/google/go-containerregistry v0.20.0/go.mod h1:YCMFNQeeXeLF+dnhhWkqDItx/JSkH01j1Kis4PsjzFI=
github.com/google/go-containerregistry v0.20.1 h1:eTgx9QNYugV4DN5mz4U8hiAGTi1ybXn0TPi4Smd8du0=
github.com/google/go-containerregistry v0.20.1/go.mod h1:YCMFNQeeXeLF+dnhhWkqDItx/JSkH01j1Kis4PsjzFI=
github.com/google/go-github/v55 v55.0.0 h1:4pp/1tNMB9X/LuAhs5i0KQAE40NmiR/y6prLNb9x9cg=
Expand Down Expand Up @@ -548,12 +546,8 @@ github.com/sigstore/protobuf-specs v0.3.2 h1:nCVARCN+fHjlNCk3ThNXwrZRqIommIeNKWw
github.com/sigstore/protobuf-specs v0.3.2/go.mod h1:RZ0uOdJR4OB3tLQeAyWoJFbNCBFrPQdcokntde4zRBA=
github.com/sigstore/rekor v1.3.6 h1:QvpMMJVWAp69a3CHzdrLelqEqpTM3ByQRt5B5Kspbi8=
github.com/sigstore/rekor v1.3.6/go.mod h1:JDTSNNMdQ/PxdsS49DJkJ+pRJCO/83nbR5p3aZQteXc=
github.com/sigstore/sigstore v1.8.7 h1:L7/zKauHTg0d0Hukx7qlR4nifh6T6O6UIt9JBwAmTIg=
github.com/sigstore/sigstore v1.8.7/go.mod h1:MPiQ/NIV034Fc3Kk2IX9/XmBQdK60wfmpvgK9Z1UjRA=
github.com/sigstore/sigstore v1.8.8 h1:B6ZQPBKK7Z7tO3bjLNnlCMG+H66tO4E/+qAphX8T/hg=
github.com/sigstore/sigstore v1.8.8/go.mod h1:GW0GgJSCTBJY3fUOuGDHeFWcD++c4G8Y9K015pwcpDI=
github.com/sigstore/sigstore-go v0.5.1 h1:5IhKvtjlQBeLnjKkzMELNG4tIBf+xXQkDzhLV77+/8Y=
github.com/sigstore/sigstore-go v0.5.1/go.mod h1:TuOfV7THHqiDaUHuJ5+QN23RP/YoKmsbwJpY+aaYPN0=
github.com/sigstore/sigstore-go v0.6.0 h1:X72BkR8kXFcdhF/V5GA2fpFvCz+VyZ6fI0YgTBn5feI=
github.com/sigstore/sigstore-go v0.6.0/go.mod h1:+RyopI/FJDE6z5WVs2sQ2nkc+zsxxByDmbp8a4HoxbA=
github.com/sigstore/sigstore/pkg/signature/kms/aws v1.8.3 h1:LTfPadUAo+PDRUbbdqbeSl2OuoFQwUFTnJ4stu+nwWw=
Expand Down Expand Up @@ -642,8 +636,8 @@ github.com/ysmood/got v0.40.0 h1:ZQk1B55zIvS7zflRrkGfPDrPG3d7+JOza1ZkNxcc74Q=
github.com/ysmood/got v0.40.0/go.mod h1:W7DdpuX6skL3NszLmAsC5hT7JAhuLZhByVzHTq874Qg=
github.com/ysmood/gson v0.7.3 h1:QFkWbTH8MxyUTKPkVWAENJhxqdBa4lYTQWqZCiLG6kE=
github.com/ysmood/gson v0.7.3/go.mod h1:3Kzs5zDl21g5F/BlLTNcuAGAYLKt2lV5G8D1zF3RNmg=
github.com/ysmood/leakless v0.8.0 h1:BzLrVoiwxikpgEQR0Lk8NyBN5Cit2b1z+u0mgL4ZJak=
github.com/ysmood/leakless v0.8.0/go.mod h1:R8iAXPRaG97QJwqxs74RdwzcRHT1SWCGTNqY8q0JvMQ=
github.com/ysmood/leakless v0.9.0 h1:qxCG5VirSBvmi3uynXFkcnLMzkphdh3xx5FtrORwDCU=
github.com/ysmood/leakless v0.9.0/go.mod h1:R8iAXPRaG97QJwqxs74RdwzcRHT1SWCGTNqY8q0JvMQ=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.30/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down Expand Up @@ -690,8 +684,6 @@ golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30=
golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=
golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
Expand All @@ -704,8 +696,6 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8=
golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down Expand Up @@ -736,8 +726,6 @@ golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs=
golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA=
golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -748,8 +736,6 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down Expand Up @@ -779,8 +765,6 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
Expand All @@ -791,8 +775,6 @@ golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk=
golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4=
golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU=
golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand All @@ -805,8 +787,6 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
Expand Down
10 changes: 5 additions & 5 deletions internal/builders/docker/pkg/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func Test_CreateBuildDefinition(t *testing.T) {
}

if diff := cmp.Diff(got, want); diff != "" {
t.Errorf(diff)
t.Error(diff)
}
}

Expand Down Expand Up @@ -206,7 +206,7 @@ func Test_inspectArtifacts(t *testing.T) {
want := []intoto.Subject{s1, s2, s3, s4}

if diff := cmp.Diff(got, want); diff != "" {
t.Errorf(diff)
t.Error(diff)
}
}

Expand Down Expand Up @@ -256,7 +256,7 @@ func Test_inspectArtifactsNoRoot(t *testing.T) {
want := []intoto.Subject{s1, s2, s3, s4}

if diff := cmp.Diff(got, want); diff != "" {
t.Errorf(diff)
t.Error(diff)
}
}

Expand Down Expand Up @@ -317,7 +317,7 @@ func Test_ParseProvenance(t *testing.T) {
}

if diff := cmp.Diff(got, want); diff != "" {
t.Errorf(diff)
t.Error(diff)
}
}

Expand Down Expand Up @@ -345,7 +345,7 @@ func Test_ProvenanceStatementSLSA1_ToDockerBuildConfig(t *testing.T) {
ForceCheckout: true,
}
if diff := cmp.Diff(got, want); diff != "" {
t.Errorf(diff)
t.Error(diff)
}
}

Expand Down
2 changes: 1 addition & 1 deletion internal/builders/docker/pkg/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func Test_BuildDefinition(t *testing.T) {
}

if diff := cmp.Diff(got, want); diff != "" {
t.Errorf(diff)
t.Error(diff)
}
}

Expand Down
4 changes: 2 additions & 2 deletions internal/builders/docker/pkg/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func Test_LoadBuildConfigFromFile(t *testing.T) {
}

if diff := cmp.Diff(got, want); diff != "" {
t.Errorf(diff)
t.Error(diff)
}
}

Expand Down Expand Up @@ -85,6 +85,6 @@ func Test_NewDockerBuildConfig(t *testing.T) {
}

if diff := cmp.Diff(got, want); diff != "" {
t.Errorf(diff)
t.Error(diff)
}
}
8 changes: 4 additions & 4 deletions internal/builders/go/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func checkWorkingDir(t *testing.T, wd, expected string) {
}

if expectedWd != wd {
t.Errorf(cmp.Diff(wd, expectedWd))
t.Error(cmp.Diff(wd, expectedWd))
}
}

Expand Down Expand Up @@ -336,19 +336,19 @@ func Test_runBuild(t *testing.T) {
}

if !cmp.Equal(subject, tt.subject) {
t.Errorf(cmp.Diff(subject, tt.subject))
t.Error(cmp.Diff(subject, tt.subject))
}

commands := append([]string{goc, "build", "-mod=vendor"}, tt.commands...)
if !cmp.Equal(cmd, commands) {
t.Errorf(cmp.Diff(cmd, commands))
t.Error(cmp.Diff(cmd, commands))
}

checkWorkingDir(t, wd, tt.workingDir)

sorted := cmpopts.SortSlices(func(a, b string) bool { return a < b })
if !cmp.Equal(env, tt.envs, sorted) {
t.Errorf(cmp.Diff(env, tt.envs))
t.Error(cmp.Diff(env, tt.envs))
}
})
}
Expand Down
18 changes: 9 additions & 9 deletions internal/builders/go/pkg/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func Test_isAllowedEnvVariable(t *testing.T) {

r := isAllowedEnvVariable(tt.variable)
if !cmp.Equal(r, tt.expected) {
t.Errorf(cmp.Diff(r, tt.expected))
t.Error(cmp.Diff(r, tt.expected))
}
})
}
Expand Down Expand Up @@ -140,7 +140,7 @@ func Test_getOutputBinaryPath(t *testing.T) {
}

if !cmp.Equal(r, tt.path) {
t.Errorf(cmp.Diff(r, tt.path))
t.Error(cmp.Diff(r, tt.path))
}
})
}
Expand Down Expand Up @@ -183,7 +183,7 @@ func Test_isAllowedArg(t *testing.T) {

r := isAllowedArg(tt.argument)
if !cmp.Equal(r, tt.expected) {
t.Errorf(cmp.Diff(r, tt.expected))
t.Error(cmp.Diff(r, tt.expected))
}
})
}
Expand Down Expand Up @@ -491,7 +491,7 @@ func Test_generateOutputFilename(t *testing.T) {
}

if fn != tt.expected.fn {
t.Errorf(cmp.Diff(fn, tt.expected.fn))
t.Error(cmp.Diff(fn, tt.expected.fn))
}
})
}
Expand Down Expand Up @@ -619,7 +619,7 @@ func Test_SetArgEnvVariables(t *testing.T) {

sorted := cmpopts.SortSlices(func(a, b string) bool { return a < b })
if !cmp.Equal(b.argEnv, tt.expected.env, sorted) {
t.Errorf(cmp.Diff(b.argEnv, tt.expected.env))
t.Error(cmp.Diff(b.argEnv, tt.expected.env))
}
})
}
Expand Down Expand Up @@ -731,7 +731,7 @@ func Test_generateEnvVariables(t *testing.T) {
expectedFlags := tt.expected.flags
sorted := cmpopts.SortSlices(func(a, b string) bool { return a < b })
if !cmp.Equal(flags, expectedFlags, sorted) {
t.Errorf(cmp.Diff(flags, expectedFlags))
t.Error(cmp.Diff(flags, expectedFlags))
}
})
}
Expand Down Expand Up @@ -905,7 +905,7 @@ func Test_generateLdflags(t *testing.T) {
}
// Note: generated env variables contain the process's env variables too.
if !cmp.Equal(ldflags, tt.outldflags) {
t.Errorf(cmp.Diff(ldflags, tt.outldflags))
t.Error(cmp.Diff(ldflags, tt.outldflags))
}
})
}
Expand Down Expand Up @@ -980,7 +980,7 @@ func Test_generateFlags(t *testing.T) {
// Note: generated env variables contain the process's env variables too.
sorted := cmpopts.SortSlices(func(a, b string) bool { return a < b })
if !cmp.Equal(flags, expectedFlags, sorted) {
t.Errorf(cmp.Diff(flags, expectedFlags))
t.Error(cmp.Diff(flags, expectedFlags))
}
})
}
Expand Down Expand Up @@ -1056,7 +1056,7 @@ func Test_generateCommand(t *testing.T) {

sorted := cmpopts.SortSlices(func(a, b string) bool { return a < b })
if !cmp.Equal(command, expectedCommand, sorted) {
t.Errorf(cmp.Diff(command, expectedCommand))
t.Error(cmp.Diff(command, expectedCommand))
}
}
})
Expand Down
2 changes: 1 addition & 1 deletion internal/builders/go/pkg/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func Test_ConfigFromFile(t *testing.T) {
}

if !cmp.Equal(*cfg, tt.config) {
t.Errorf(cmp.Diff(*cfg, tt.config))
t.Error(cmp.Diff(*cfg, tt.config))
}
})
}
Expand Down
4 changes: 2 additions & 2 deletions internal/utils/marshal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func Test_MarshalToString(t *testing.T) {
t.Errorf("MarshalToString: %v", err)
}
if !cmp.Equal(r, tt.expected) {
t.Errorf(cmp.Diff(r, tt.expected))
t.Error(cmp.Diff(r, tt.expected))
}
})
}
Expand Down Expand Up @@ -101,7 +101,7 @@ func Test_UnmarshalList(t *testing.T) {
}

if !cmp.Equal(r, tt.expected) {
t.Errorf(cmp.Diff(r, tt.expected))
t.Error(cmp.Diff(r, tt.expected))
}
})
}
Expand Down
7 changes: 2 additions & 5 deletions signing/sigstore/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ import (
)

// BundleSigner is used to produce Sigstore Bundles from provenance statements.
type BundleSigner struct {
fulcioAddr string
rekorAddr string
}
type BundleSigner struct{}

type sigstoreBundleAtt struct {
cert []byte
Expand Down Expand Up @@ -104,7 +101,7 @@ func (s *BundleSigner) Sign(ctx context.Context, statement *intoto.Statement) (s
" https://search.sigstore.dev/?logIndex=%[1]d", logIndex)

// marshall to json.
bundleWrapper := &sigstoreBundle.ProtobufBundle{
bundleWrapper := &sigstoreBundle.Bundle{
Bundle: innerBundle,
}
bundleBytes, err := bundleWrapper.MarshalJSON()
Expand Down

0 comments on commit b0342eb

Please sign in to comment.