doi: github.com/hscells/doi Index | Files

package doi

import "github.com/hscells/doi"

Package doi is a library for parsing and dealing with digital object identifiers.

Index

Package Files

doi.go

type DigitalObjectIdentifier Uses

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 Uses

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 Uses

func (d DigitalObjectIdentifier) IsValid() bool

IsValid checks to see if a DigitalObjectIdentifier is valid or not.

func (DigitalObjectIdentifier) ToString Uses

func (d DigitalObjectIdentifier) ToString() (string, error)

ToString creates a string representation of a DigitalObjectIdentifier.

Package doi imports 1 packages (graph). Updated 2019-03-22. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).