The Central Go Modules Repository

To use GoCenter:
export GOPROXY=https://gocenter.io
0
Stars
MIT
License
2
Downloads
January 1st 0001
Last Modified
Version:
Loading...

go-msgauth

GoDoc Build Status

A Go library to create and parse Authentication-Results header fields.

Usage

// Format
results := []msgauth.Result{
	&msgauth.SPFResult{Value: msgauth.ResultPass, From: "example.net"},
	&msgauth.AuthResult{Value: msgauth.ResultPass, Auth: "sender@example.com"},
}
s := msgauth.Format("example.com", results)
log.Println(s)

// Parse
identifier, results, err := msgauth.Parse(s)
if err != nil {
	log.Fatal(err)
}

log.Println(identifier, results)

License

MIT