git » spf » commit 3731c77

doc: Minor wording and formatting updates

author Alberto Bertogli
2023-07-05 16:35:06 UTC
committer Alberto Bertogli
2023-07-05 16:35:06 UTC
parent 6140b4090e9e7150741ff4c254866f154af0bb57

doc: Minor wording and formatting updates

This patch removes the list of supported mechanisms and modifiers, which
is unnecessary since we accept all of them, and does a gofmt -s pass to
update some of the other comments to the current standard style.

internal/dnstest/dns.go +0 -1
spf.go +4 -14
yml_test.go +7 -3

diff --git a/internal/dnstest/dns.go b/internal/dnstest/dns.go
index 2ec1551..ad66e3c 100644
--- a/internal/dnstest/dns.go
+++ b/internal/dnstest/dns.go
@@ -16,7 +16,6 @@ import (
 //
 // Not exported since this is not part of the public API and only used
 // internally on tests.
-//
 type TestResolver struct {
 	Txt    map[string][]string
 	Mx     map[string][]*net.MX
diff --git a/spf.go b/spf.go
index 5d5784c..2adc3f4 100644
--- a/spf.go
+++ b/spf.go
@@ -8,22 +8,12 @@
 // This package is intended to be used by SMTP servers to implement SPF
 // validation.
 //
-// All mechanisms and modifiers are supported:
-//   all
-//   include
-//   a
-//   mx
-//   ptr
-//   ip4
-//   ip6
-//   exists
-//   redirect
-//   exp (ignored)
-//   Macros
+// All SPF mechanisms, modifiers, and macros are supported.
 //
 // References:
-//   https://tools.ietf.org/html/rfc7208
-//   https://en.wikipedia.org/wiki/Sender_Policy_Framework
+//
+//	https://tools.ietf.org/html/rfc7208
+//	https://en.wikipedia.org/wiki/Sender_Policy_Framework
 package spf // import "blitiri.com.ar/go/spf"
 
 import (
diff --git a/yml_test.go b/yml_test.go
index fd45ce8..e9f94f2 100644
--- a/yml_test.go
+++ b/yml_test.go
@@ -114,7 +114,9 @@ func (sl *stringSlice) UnmarshalYAML(value *yaml.Node) error {
 }
 
 // MX is encoded as:
-//     MX: [0, mail.example.com]
+//
+//	MX: [0, mail.example.com]
+//
 // so we have a custom decoder to handle the multi-typed list.
 type MX struct {
 	Prio uint16
@@ -273,8 +275,10 @@ func resultIn(got Result, exp []string) bool {
 }
 
 // Take a reverse-dns host name of the form:
-//   4.3.2.1.in-addr.arpa
-//   1.0.0.0.0.[...].0.0.E.B.A.B.E.F.A.C.ip6.arpa
+//
+//	4.3.2.1.in-addr.arpa
+//	1.0.0.0.0.[...].0.0.E.B.A.B.E.F.A.C.ip6.arpa
+//
 // and returns the corresponding ip.
 func reverseDNS(t *testing.T, r string) net.IP {
 	s := ""