Documentation ¶
Overview ¶
Package doi is a library for parsing and dealing with digital object identifiers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DigitalObjectIdentifier ¶
type DigitalObjectIdentifier struct { General string DirectoryIndicator string RegistrantCode string }
DigitalObjectIdentifier is a struct that contains the three fields of a doi: https://www.doi.org/doi_handbook/2_Numbering.html#2.2
func Parse ¶
func Parse(doi string) (DigitalObjectIdentifier, error)
Parse takes a string as input and attempts to parse a valid doi from it. The parsing is done to conform to the standard outlined in https://www.doi.org/doi_handbook/2_Numbering.html#2.2.
func (DigitalObjectIdentifier) IsValid ¶
func (d DigitalObjectIdentifier) IsValid() bool
IsValid checks to see if a DigitalObjectIdentifier is valid or not.
func (DigitalObjectIdentifier) ToString ¶
func (d DigitalObjectIdentifier) ToString() (string, error)
ToString creates a string representation of a DigitalObjectIdentifier.
Click to show internal directories.
Click to hide internal directories.