Skip to content

Commit 296b9a2

Browse files
committed
refactor(release): remove error return from infallible function
1 parent 26b0754 commit 296b9a2

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

dist/sign-release.go

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -811,12 +811,7 @@ func RelicFile(inFilePath string, outFilePath string, signingType RelicSigningTy
811811
}
812812

813813
func RelicVerifyFile(filePath string) error {
814-
certOptions, err := GetRelicVerifyCertOptions()
815-
if err != nil {
816-
return err
817-
}
818-
819-
options := append(append([]string{"verify"}, certOptions...),
814+
options := append(append([]string{"verify"}, GetRelicVerifyCertOptions()...),
820815
"--", filePath)
821816
process := exec.Command(
822817
"relic",
@@ -835,12 +830,7 @@ func RelicVerifyFile(filePath string) error {
835830
}
836831

837832
func RelicVerifyDetachedFile(filePath string, detachedSignaturePath string) error {
838-
certOptions, err := GetRelicVerifyCertOptions()
839-
if err != nil {
840-
return err
841-
}
842-
843-
options := append(append([]string{"verify"}, certOptions...),
833+
options := append(append([]string{"verify"}, GetRelicVerifyCertOptions()...),
844834
"--content", filePath,
845835
"--", detachedSignaturePath)
846836
process := exec.Command(
@@ -859,13 +849,13 @@ func RelicVerifyDetachedFile(filePath string, detachedSignaturePath string) erro
859849
return nil
860850
}
861851

862-
func GetRelicVerifyCertOptions() ([]string, error) {
852+
func GetRelicVerifyCertOptions() []string {
863853
return []string{
864854
"--cert", filepath.Join(DistPath, "certificates/quick-lint-js.cer"),
865855
"--cert", filepath.Join(DistPath, "certificates/DigiCertAssuredIDRootCA_comb.crt.pem"),
866856
"--cert", filepath.Join(DistPath, "certificates/DigiCertTrustedRootG4.crt"),
867857
"--cert", filepath.Join(DistPath, "certificates/quick-lint-js.gpg.key"),
868-
}, nil
858+
}
869859
}
870860

871861
func WriteTarEntry(header *tar.Header, fileContent []byte, output *tar.Writer) error {

0 commit comments

Comments
 (0)