git » spf » commit bd2e48f

Simplify a sub-slice operation

author Alberto Bertogli
2019-10-18 19:40:35 UTC
committer Alberto Bertogli
2019-10-18 19:40:35 UTC
parent 83e6591a09e5ff2d363bef1ad5fe107fd92dd89b

Simplify a sub-slice operation

This patch simplifies a sub-slice operation, just for style and
readability.

spf.go +1 -1

diff --git a/spf.go b/spf.go
index 139b864..788a1fc 100644
--- a/spf.go
+++ b/spf.go
@@ -779,7 +779,7 @@ func (r *resolution) expandMacros(s, domain string) (string, error) {
 				if digits > len(split) {
 					digits = len(split)
 				}
-				split = split[len(split)-digits : len(split)]
+				split = split[len(split)-digits:]
 			}
 
 			// Join back, always with "."