Documentation
¶
Overview ¶
Package doiutils provides a set of functions to work with DOIs
Index ¶
- func DOIResolver(doi string, sandbox bool) string
- func EscapeDOI(doi string) string
- func GetDOIRA(doi string) (string, bool)
- func IsRogueScholarDOI(doi string) bool
- func NormalizeDOI(doi string) string
- func PrefixFromUrl(str string) (string, error)
- func ValidateDOI(doi string) (string, bool)
- func ValidatePrefix(doi string) (string, bool)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DOIResolver ¶
DOIResolver returns a DOI resolver for a given DOI
func EscapeDOI ¶ added in v0.5.27
EscapeDOI escapes a DOI, i.e. replaces '/' with '%2F'
Example ¶
package main
import (
"fmt"
"github.com/front-matter/commonmeta/doiutils"
)
func main() {
s := doiutils.EscapeDOI("10.59350/k0746-rsc44")
fmt.Println(s)
}
Output: 10.59350%2Fk0746-rsc44
func IsRogueScholarDOI ¶ added in v0.2.14
IsRogueScholarDOI checks if a DOI is from Rogue Scholar
func PrefixFromUrl ¶
PrefixFromUrl extracts DOI prefix from URL
func ValidatePrefix ¶
ValidatePrefix validates a DOI prefix for a given DOI
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.