Fix go vet issues

This commit is contained in:
nemunaire 2021-03-08 14:49:44 +01:00
commit cd6a63fc57
6 changed files with 15 additions and 15 deletions

View file

@ -207,7 +207,7 @@ func check_matrix(domain string) (version string, err error) {
version = federationTest.Version.Name + " " + federationTest.Version.Version
return version, nil
} else if err = json.NewDecoder(resp.Body).Decode(&federationTest); err != nil {
log.Printf("Error in chech_matrix, when decoding json:", err.Error())
log.Printf("Error in chech_matrix, when decoding json: %w", err.Error())
return "", fmt.Errorf("Sorry, the federation tester is broken. Check on https://federationtester.matrix.org/#%s", domain)
} else if federationTest.DNSResult.SRVError != nil && federationTest.WellKnownResult.Result != "" {
return "", fmt.Errorf("%s OR %s", federationTest.DNSResult.SRVError.Message, federationTest.WellKnownResult.Result)