Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/philpennock/emailsupport

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/philpennock/emailsupport

  • v1.0.1
  • Source
  • Go
  • Socket score

Version published
Created
Source

emailsupport

This package contains auxiliary support information and routines for dealing with email handling.

Build Status Documentation Coverage Status

At present, it only has some regular expressions which have been tested by being in use for many years, in Perl, but have here been translated to Golang's regexp library. Other bits and pieces will creep in, as this package acts as a ‘miscellaneous’ catch-all for anything Golang that's email-related. As such, I'm not prepared to make API guarantees, so be sure to use dependency management to track this repository.

Using

This package follows normal Go package naming convention and is go get compatible.

The package is documented using the native godoc system. A public interface is available at godoc.org.

The allowed syntax for email addresses changes between RFC2821/RFC2822 and their replacements, RFC5321/RFC5322. By default, the regular expressions employ the newer syntax definitions, but you can build the library with a build-tag of rfc2822 to use the definitions supplied in RFC2822 instead of those from RFC5321.

This package uses semantic versioning.
Note that Go only supports the most recent two minor versions of the language; for the purposes of semver, we do not consider it a breaking change to add a dependency upon a language or standard library feature supported by all currently-supported releases of Go.

Tools

This is primarily a library package. It does include two commands though. This follows the standard Go idiom of using sub-directories of ./cmd to hold the commands. Thus you can use go install ./cmd/... to install them.

Or: go install -v github.com/philpennock/emailsupport/cmd/...@latest

  1. email-regexp-emit: just prints a regular expression for an email address. The pattern uses (?:  ) as a non-capturing group and is otherwise a simple Extended Regular Expression, so just about any modern regular expression library should be able to use it.

  2. check-is-emailaddr: can be given regexps on the command-line, or via an input file, and for each one reports success or failure. It exits true (0) if and only if every address given is fine. It exits 1 if some input is not an email address. It exists another non-zero value for problems in running.

Testing

Run go test

FAQs

Package last updated on 09 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc