From 3a00660aa2574a592641b86142685e0938a9b988 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Mon, 22 Apr 2024 17:19:51 +0200 Subject: [PATCH] rename package --- cff/cff.go | 2 +- cmd/convert.go | 8 ++-- cmd/list.go | 66 ++++++++++++++++++++++++--------- cmd/root.go | 2 +- cmd/sample.go | 32 +++++++++------- codemeta/codemeta.go | 2 +- commonmeta/commonmeta.go | 4 +- crossref/crossref.go | 26 +++++++------ crossref/crossref_test.go | 34 +++++++++-------- crossrefxml/crossrefxml.go | 2 +- csl/csl.go | 2 +- datacite/datacite.go | 22 ++++++----- datacite/datacite_test.go | 7 ++-- dateutils/dateutils_test.go | 2 +- doiutils/doiutils_test.go | 2 +- go.mod | 2 +- inveniordm/inveniordm.go | 2 +- inveniordm/inveniordm_test.go | 2 +- jsonfeed/jsonfeed.go | 3 +- jsonfeed/jsonfeed_test.go | 2 +- main.go | 2 +- schemaorg/schemaorg.go | 2 +- schemautils/schemautils_test.go | 4 +- types/types_test.go | 2 +- utils/utils.go | 2 +- utils/utils_test.go | 2 +- 26 files changed, 142 insertions(+), 96 deletions(-) diff --git a/cff/cff.go b/cff/cff.go index 41449ad..b2f4976 100644 --- a/cff/cff.go +++ b/cff/cff.go @@ -1,6 +1,6 @@ package cff -import "github.com/front-matter/commonmeta-go/types" +import "commonmeta-go/types" type Content struct { ID string `json:"id"` diff --git a/cmd/convert.go b/cmd/convert.go index 189881b..decd881 100644 --- a/cmd/convert.go +++ b/cmd/convert.go @@ -8,11 +8,11 @@ import ( "fmt" "strings" - "github.com/front-matter/commonmeta-go/datacite" - "github.com/front-matter/commonmeta-go/doiutils" - "github.com/front-matter/commonmeta-go/types" + "commonmeta-go/datacite" + "commonmeta-go/doiutils" + "commonmeta-go/types" - "github.com/front-matter/commonmeta-go/crossref" + "commonmeta-go/crossref" "github.com/spf13/cobra" ) diff --git a/cmd/list.go b/cmd/list.go index fb7c673..b2a5d99 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -4,36 +4,68 @@ Copyright © 2024 Front Matter package cmd import ( + "bytes" + "encoding/json" "fmt" + "commonmeta-go/commonmeta" + + "commonmeta-go/crossref" + + "commonmeta-go/datacite" + + "commonmeta-go/types" + "github.com/spf13/cobra" ) // listCmd represents the list command var listCmd = &cobra.Command{ Use: "list", - Short: "A brief description of your command", - Long: `A longer description that spans multiple lines and likely contains examples -and usage of using your command. For example: + Short: "A list of works", + Long: `A list of works. Currently only available for + the Crossref and DataCite provider. Options include numnber of works, + work type, and Crossref member id or DataCite client id. For example: -Cobra is a CLI library for Go that empowers applications. -This application is a tool to generate the needed files -to quickly create a Cobra application.`, + commonmeta list --number 10 --member 78 --type journal-article, + commonmeta list --number 10 --member cern.zenodo --type dataset`, Run: func(cmd *cobra.Command, args []string) { - fmt.Println("list called") + number, _ := cmd.Flags().GetInt("number") + from, _ := cmd.Flags().GetString("from") + + member, _ := cmd.Flags().GetString("member") + type_, _ := cmd.Flags().GetString("type") + hasORCID, _ := cmd.Flags().GetBool("has-orcid") + hasROR, _ := cmd.Flags().GetBool("has-ror-id") + hasReferences, _ := cmd.Flags().GetBool("has-references") + hasRelation, _ := cmd.Flags().GetBool("has-relation") + hasAbstract, _ := cmd.Flags().GetBool("has-abstract") + hasAward, _ := cmd.Flags().GetBool("has-award") + hasLicense, _ := cmd.Flags().GetBool("has-license") + hasArchive, _ := cmd.Flags().GetBool("has-archive") + + var data []types.Data + var err error + sample := false + if from == "crossref" { + data, err = crossref.FetchCrossrefList(number, member, type_, sample, hasORCID, hasROR, hasReferences, hasRelation, hasAbstract, hasAward, hasLicense, hasArchive) + } else if from == "datacite" { + data, err = datacite.FetchDataciteList(number, sample) + } + if err != nil { + fmt.Println(err) + } + output, jsErr := commonmeta.WriteCommonmetaList(data) + var out bytes.Buffer + json.Indent(&out, output, "=", "\t") + fmt.Println(out.String()) + + if jsErr != nil { + fmt.Println(jsErr) + } }, } func init() { rootCmd.AddCommand(listCmd) - - // Here you will define your flags and configuration settings. - - // Cobra supports Persistent Flags which will work for this command - // and all subcommands, e.g.: - // listCmd.PersistentFlags().String("foo", "", "A help for foo") - - // Cobra supports local flags which will only run when this command - // is called directly, e.g.: - // listCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") } diff --git a/cmd/root.go b/cmd/root.go index 8fa88e5..3b308d6 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -36,7 +36,7 @@ func init() { rootCmd.PersistentFlags().StringP("from", "f", "", "the format to convert from") rootCmd.PersistentFlags().StringP("to", "t", "commonmeta", "the format to convert to") - rootCmd.PersistentFlags().StringP("number", "n", "10", "number of samples") + rootCmd.PersistentFlags().StringP("number", "n", "10", "number of results") rootCmd.PersistentFlags().StringP("member", "m", "", "Crossref member ID") rootCmd.PersistentFlags().StringP("type", "", "journal-article", "work type") rootCmd.PersistentFlags().BoolP("has-orcid", "", false, "has one or more ORCID IDs") diff --git a/cmd/sample.go b/cmd/sample.go index dcb42e4..c45fb0c 100644 --- a/cmd/sample.go +++ b/cmd/sample.go @@ -8,10 +8,13 @@ import ( "encoding/json" "fmt" - "github.com/front-matter/commonmeta-go/commonmeta" - "github.com/front-matter/commonmeta-go/crossref" - "github.com/front-matter/commonmeta-go/datacite" - "github.com/front-matter/commonmeta-go/types" + "commonmeta-go/commonmeta" + + "commonmeta-go/crossref" + + "commonmeta-go/datacite" + + "commonmeta-go/types" "github.com/spf13/cobra" ) @@ -21,13 +24,15 @@ var sampleCmd = &cobra.Command{ Use: "sample", Short: "A random sample of works", Long: `A random sample of works. Currently only available for - the Crossref API. Options include numnber of samples, Crossref - member id and work type. For example: + the Crossref and DataCite provider. Options include numnber of samples, + work type, and Crossref member id or DataCite client id. For example: + + commonmeta sample --number 10 --member 78 --type journal-article, + commonmeta sample --number 10 --member cern.zenodo --type dataset`, - commonmeta sample --number 10 --member 78 --type journal-article`, Run: func(cmd *cobra.Command, args []string) { number, _ := cmd.Flags().GetInt("number") - provider, _ := cmd.Flags().GetString("provider") + from, _ := cmd.Flags().GetString("from") member, _ := cmd.Flags().GetString("member") type_, _ := cmd.Flags().GetString("type") @@ -42,10 +47,11 @@ var sampleCmd = &cobra.Command{ var data []types.Data var err error - if provider == "crossref" { - data, err = crossref.FetchCrossrefSample(number, member, type_, hasORCID, hasROR, hasReferences, hasRelation, hasAbstract, hasAward, hasLicense, hasArchive) - } else if provider == "datacite" { - data, err = datacite.FetchDataciteSample(number) + sample := true + if from == "crossref" { + data, err = crossref.FetchCrossrefList(number, member, type_, sample, hasORCID, hasROR, hasReferences, hasRelation, hasAbstract, hasAward, hasLicense, hasArchive) + } else if from == "datacite" { + data, err = datacite.FetchDataciteList(number, sample) } if err != nil { fmt.Println(err) @@ -63,6 +69,4 @@ var sampleCmd = &cobra.Command{ func init() { rootCmd.AddCommand(sampleCmd) - - sampleCmd.PersistentFlags().StringP("provider", "", "crossref", "the provider to get a sample from") } diff --git a/codemeta/codemeta.go b/codemeta/codemeta.go index 2a75b63..7fdbde6 100644 --- a/codemeta/codemeta.go +++ b/codemeta/codemeta.go @@ -1,6 +1,6 @@ package codemeta -import "github.com/front-matter/commonmeta-go/types" +import "commonmeta-go/types" type Content struct { ID string `json:"id"` diff --git a/commonmeta/commonmeta.go b/commonmeta/commonmeta.go index 355c97d..2f3e8da 100644 --- a/commonmeta/commonmeta.go +++ b/commonmeta/commonmeta.go @@ -5,8 +5,8 @@ import ( "encoding/json" "fmt" - "github.com/front-matter/commonmeta-go/schemautils" - "github.com/front-matter/commonmeta-go/types" + "commonmeta-go/schemautils" + "commonmeta-go/types" "github.com/xeipuuv/gojsonschema" ) diff --git a/crossref/crossref.go b/crossref/crossref.go index 7643a1e..3687df7 100644 --- a/crossref/crossref.go +++ b/crossref/crossref.go @@ -15,10 +15,10 @@ import ( "strings" "time" - "github.com/front-matter/commonmeta-go/dateutils" - "github.com/front-matter/commonmeta-go/doiutils" - "github.com/front-matter/commonmeta-go/types" - "github.com/front-matter/commonmeta-go/utils" + "commonmeta-go/dateutils" + "commonmeta-go/doiutils" + "commonmeta-go/types" + "commonmeta-go/utils" ) type Content struct { @@ -247,10 +247,10 @@ func FetchCrossref(str string) (types.Data, error) { return data, nil } -func FetchCrossrefSample(number int, member string, _type string, hasORCID bool, hasROR bool, hasReferences bool, hasRelation bool, hasAbstract bool, hasAward bool, hasLicense bool, hasArchive bool) ([]types.Data, error) { +func FetchCrossrefList(number int, member string, _type string, sample bool, hasORCID bool, hasROR bool, hasReferences bool, hasRelation bool, hasAbstract bool, hasAward bool, hasLicense bool, hasArchive bool) ([]types.Data, error) { var data []types.Data - content, err := GetCrossrefSample(number, member, _type, hasORCID, hasROR, hasReferences, hasRelation, hasAbstract, hasAward, hasLicense, hasArchive) + content, err := GetCrossrefList(number, member, _type, sample, hasORCID, hasROR, hasReferences, hasRelation, hasAbstract, hasAward, hasLicense, hasArchive) if err != nil { return data, err } @@ -566,7 +566,7 @@ func ReadCrossref(content Content) (types.Data, error) { return data, nil } -func GetCrossrefSample(number int, member string, _type string, hasORCID bool, hasROR bool, hasReferences bool, hasRelation bool, hasAbstract bool, hasAward bool, hasLicense bool, hasArchive bool) ([]Content, error) { +func GetCrossrefList(number int, member string, _type string, sample bool, hasORCID bool, hasROR bool, hasReferences bool, hasRelation bool, hasAbstract bool, hasAward bool, hasLicense bool, hasArchive bool) ([]Content, error) { // the envelope for the JSON response from the Crossref API type Response struct { Status string `json:"status"` @@ -581,11 +581,11 @@ func GetCrossrefSample(number int, member string, _type string, hasORCID bool, h if number > 100 { number = 100 } - url := CrossrefApiSampleUrl(number, member, _type, hasORCID, hasROR, hasReferences, hasRelation, hasAbstract, hasAward, hasLicense, hasArchive) + url := CrossrefQueryUrl(number, member, _type, sample, hasORCID, hasROR, hasReferences, hasRelation, hasAbstract, hasAward, hasLicense, hasArchive) req, err := http.NewRequest("GET", url, nil) v := "0.1" u := "info@front-matter.io" - userAgent := fmt.Sprintf("commonmeta-go/%s (https://commonmeta.org/commonmeta-go/; mailto: %s)", v, u) + userAgent := fmt.Sprintf("commonmeta-go/%s (https://commonmeta.org; mailto: %s)", v, u) req.Header.Set("User-Agent", userAgent) req.Header.Set("Cache-Control", "private") if err != nil { @@ -613,7 +613,7 @@ func GetCrossrefSample(number int, member string, _type string, hasORCID bool, h return response.Message.Items, nil } -func CrossrefApiSampleUrl(number int, member string, _type string, hasORCID bool, hasROR bool, hasReferences bool, hasRelation bool, hasAbstract bool, hasAward bool, hasLicense bool, hasArchive bool) string { +func CrossrefQueryUrl(number int, member string, _type string, sample bool, hasORCID bool, hasROR bool, hasReferences bool, hasRelation bool, hasAbstract bool, hasAward bool, hasLicense bool, hasArchive bool) string { types := []string{ "book-section", "monograph", @@ -660,7 +660,11 @@ func CrossrefApiSampleUrl(number int, member string, _type string, hasORCID bool } u, _ := url.Parse("https://api.crossref.org/works") values := u.Query() - values.Add("sample", strconv.Itoa(number)) + if sample { + values.Add("sample", strconv.Itoa(number)) + } else { + values.Add("rows", strconv.Itoa(number)) + } var filters []string if member != "" { filters = append(filters, "member:"+member) diff --git a/crossref/crossref_test.go b/crossref/crossref_test.go index 74e4fc1..ac7ca33 100644 --- a/crossref/crossref_test.go +++ b/crossref/crossref_test.go @@ -7,9 +7,9 @@ import ( "strings" "testing" - "github.com/front-matter/commonmeta-go/crossref" - "github.com/front-matter/commonmeta-go/doiutils" - "github.com/front-matter/commonmeta-go/types" + "commonmeta-go/crossref" + "commonmeta-go/doiutils" + "commonmeta-go/types" "github.com/google/go-cmp/cmp" ) @@ -96,51 +96,53 @@ func TestFetchCrossref(t *testing.T) { } } -func TestCrossrefApiSampleUrl(t *testing.T) { +func TestCrossrefQueryUrl(t *testing.T) { t.Parallel() type testCase struct { number int member string _type string + sample bool want string } testCases := []testCase{ - {number: 10, member: "340", _type: "journal-article", want: "https://api.crossref.org/works?filter=member%3A340%2Ctype%3Ajournal-article&sample=10"}, - {number: 1, member: "", _type: "posted-content", want: "https://api.crossref.org/works?filter=type%3Aposted-content&sample=1"}, - {number: 20, member: "78", _type: "", want: "https://api.crossref.org/works?filter=member%3A78&sample=20"}, - {number: 120, member: "", _type: "", want: "https://api.crossref.org/works?sample=120"}, + {number: 10, member: "340", _type: "journal-article", sample: false, want: "https://api.crossref.org/works?filter=member%3A340%2Ctype%3Ajournal-article&sample=10"}, + {number: 1, member: "", _type: "posted-content", sample: true, want: "https://api.crossref.org/works?filter=type%3Aposted-content&sample=1"}, + {number: 20, member: "78", _type: "", sample: true, want: "https://api.crossref.org/works?filter=member%3A78&sample=20"}, + {number: 120, member: "", _type: "", sample: true, want: "https://api.crossref.org/works?sample=120"}, } for _, tc := range testCases { - got := crossref.CrossrefApiSampleUrl(tc.number, tc.member, tc._type, false, false, false, false, false, false, false, false) + got := crossref.CrossrefQueryUrl(tc.number, tc.member, tc._type, tc.sample, false, false, false, false, false, false, false, false) if diff := cmp.Diff(tc.want, got); diff != "" { - t.Errorf("CrossrefApiSampleUrl mismatch (-want +got):\n%s", diff) + t.Errorf("CrossrefQueryUrl mismatch (-want +got):\n%s", diff) } } } -func TestGetCrossrefSample(t *testing.T) { +func TestGetCrossrefList(t *testing.T) { t.Parallel() type testCase struct { number int member string _type string + sample bool } testCases := []testCase{ - {number: 3, member: "340", _type: "journal-article"}, - {number: 1, member: "", _type: "posted-content"}, - {number: 2, member: "", _type: ""}, + {number: 3, member: "340", _type: "journal-article", sample: false}, + {number: 1, member: "", _type: "posted-content", sample: true}, + {number: 2, member: "", _type: "", sample: true}, } for _, tc := range testCases { - got, err := crossref.GetCrossrefSample(tc.number, tc.member, tc._type, false, false, false, false, false, false, false, false) + got, err := crossref.GetCrossrefList(tc.number, tc.member, tc._type, true, false, false, false, false, false, false, false, false) if err != nil { t.Errorf("GetCrossrefSample(%v): error %v", tc.number, err) } if diff := cmp.Diff(tc.number, len(got)); diff != "" { - t.Errorf("GetCrossrefSample mismatch (-want +got):\n%s", diff) + t.Errorf("GetCrossrefList mismatch (-want +got):\n%s", diff) } } } diff --git a/crossrefxml/crossrefxml.go b/crossrefxml/crossrefxml.go index 09fd7b6..6244664 100644 --- a/crossrefxml/crossrefxml.go +++ b/crossrefxml/crossrefxml.go @@ -1,7 +1,7 @@ package crossrefxml import ( - "github.com/front-matter/commonmeta-go/types" + "commonmeta-go/types" ) type Content struct { diff --git a/csl/csl.go b/csl/csl.go index c0e154b..42599bd 100644 --- a/csl/csl.go +++ b/csl/csl.go @@ -1,6 +1,6 @@ package csl -import "github.com/front-matter/commonmeta-go/types" +import "commonmeta-go/types" type Content struct { ID string `json:"id"` diff --git a/datacite/datacite.go b/datacite/datacite.go index f4d4800..79717ba 100644 --- a/datacite/datacite.go +++ b/datacite/datacite.go @@ -12,10 +12,11 @@ import ( "strings" "time" - "github.com/front-matter/commonmeta-go/constants" - "github.com/front-matter/commonmeta-go/doiutils" - "github.com/front-matter/commonmeta-go/types" - "github.com/front-matter/commonmeta-go/utils" + "commonmeta-go/constants" + "commonmeta-go/doiutils" + "commonmeta-go/types" + + "commonmeta-go/utils" ) type Content struct { @@ -175,10 +176,10 @@ func FetchDatacite(str string) (types.Data, error) { return data, nil } -func FetchDataciteSample(number int) ([]types.Data, error) { +func FetchDataciteList(number int, sample bool) ([]types.Data, error) { var data []types.Data - content, err := GetDataciteSample(number) + content, err := GetDataciteList(number, sample) if err != nil { return data, err } @@ -571,7 +572,7 @@ func GetContributor(v Contributor) types.Contributor { } } -func GetDataciteSample(number int) ([]Content, error) { +func GetDataciteList(number int, sample bool) ([]Content, error) { // the envelope for the JSON response from the DataCite API type Response struct { Data []Content `json:"data"` @@ -580,7 +581,7 @@ func GetDataciteSample(number int) ([]Content, error) { number = 100 } var response Response - url := DataciteApiSampleUrl(number) + url := DataciteQueryUrl(number, sample) req, err := http.NewRequest("GET", url, nil) if err != nil { log.Fatalln(err) @@ -607,7 +608,10 @@ func GetDataciteSample(number int) ([]Content, error) { return response.Data, nil } -func DataciteApiSampleUrl(number int) string { +func DataciteQueryUrl(number int, sample bool) string { + if sample { + number = 10 + } url := "https://api.datacite.org/dois?random=true&page[size]=" + strconv.Itoa(number) return url } diff --git a/datacite/datacite_test.go b/datacite/datacite_test.go index 6a355be..98eaf84 100644 --- a/datacite/datacite_test.go +++ b/datacite/datacite_test.go @@ -8,9 +8,10 @@ import ( "strings" "testing" - "github.com/front-matter/commonmeta-go/datacite" - "github.com/front-matter/commonmeta-go/doiutils" - "github.com/front-matter/commonmeta-go/types" + "commonmeta-go/datacite" + + "commonmeta-go/doiutils" + "commonmeta-go/types" "github.com/google/go-cmp/cmp" ) diff --git a/dateutils/dateutils_test.go b/dateutils/dateutils_test.go index 86d4578..84221ef 100644 --- a/dateutils/dateutils_test.go +++ b/dateutils/dateutils_test.go @@ -3,7 +3,7 @@ package dateutils_test import ( "testing" - "github.com/front-matter/commonmeta-go/dateutils" + "commonmeta-go/dateutils" ) // func TestGetDateParts(t *testing.T) { diff --git a/doiutils/doiutils_test.go b/doiutils/doiutils_test.go index f28eae3..e3a3646 100644 --- a/doiutils/doiutils_test.go +++ b/doiutils/doiutils_test.go @@ -3,7 +3,7 @@ package doiutils_test import ( "testing" - "github.com/front-matter/commonmeta-go/doiutils" + "commonmeta-go/doiutils" ) func TestValidateDOI(t *testing.T) { diff --git a/go.mod b/go.mod index e473ae2..fb15b26 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/front-matter/commonmeta-go +module github.com/front-matter/commonmeta go 1.22.2 diff --git a/inveniordm/inveniordm.go b/inveniordm/inveniordm.go index 82cec39..c8e8244 100644 --- a/inveniordm/inveniordm.go +++ b/inveniordm/inveniordm.go @@ -7,7 +7,7 @@ import ( "net/http" "time" - "github.com/front-matter/commonmeta-go/types" + "commonmeta-go/types" ) type Content struct { diff --git a/inveniordm/inveniordm_test.go b/inveniordm/inveniordm_test.go index 8518f11..fa3cfdb 100644 --- a/inveniordm/inveniordm_test.go +++ b/inveniordm/inveniordm_test.go @@ -3,7 +3,7 @@ package inveniordm_test import ( "testing" - "github.com/front-matter/commonmeta-go/inveniordm" + "commonmeta-go/inveniordm" ) func TestGetInvenioRDM(t *testing.T) { diff --git a/jsonfeed/jsonfeed.go b/jsonfeed/jsonfeed.go index ed25e63..49e40ab 100644 --- a/jsonfeed/jsonfeed.go +++ b/jsonfeed/jsonfeed.go @@ -1,13 +1,12 @@ package jsonfeed import ( + "commonmeta-go/types" "encoding/json" "fmt" "io" "net/http" "time" - - "github.com/front-matter/commonmeta-go/types" ) type Content struct { diff --git a/jsonfeed/jsonfeed_test.go b/jsonfeed/jsonfeed_test.go index d25fd18..a03021c 100644 --- a/jsonfeed/jsonfeed_test.go +++ b/jsonfeed/jsonfeed_test.go @@ -3,7 +3,7 @@ package jsonfeed_test import ( "testing" - "github.com/front-matter/commonmeta-go/jsonfeed" + "commonmeta-go/jsonfeed" ) func TestGetJsonFeedItem(t *testing.T) { diff --git a/main.go b/main.go index 0555122..22a64ff 100644 --- a/main.go +++ b/main.go @@ -4,7 +4,7 @@ Copyright © 2024 Front Matter package main import ( - "github.com/front-matter/commonmeta-go/cmd" + "commonmeta/cmd" ) func main() { diff --git a/schemaorg/schemaorg.go b/schemaorg/schemaorg.go index 65c1160..b20d607 100644 --- a/schemaorg/schemaorg.go +++ b/schemaorg/schemaorg.go @@ -1,6 +1,6 @@ package schemaorg -import "github.com/front-matter/commonmeta-go/types" +import "commonmeta-go/types" type Content struct { ID string `json:"id"` diff --git a/schemautils/schemautils_test.go b/schemautils/schemautils_test.go index dbad19d..ab6af68 100644 --- a/schemautils/schemautils_test.go +++ b/schemautils/schemautils_test.go @@ -4,8 +4,8 @@ import ( "encoding/json" "path/filepath" - "github.com/front-matter/commonmeta-go/schemautils" - "github.com/front-matter/commonmeta-go/types" + "commonmeta-go/schemautils" + "commonmeta-go/types" "fmt" "log" diff --git a/types/types_test.go b/types/types_test.go index c9aa648..5054a4d 100644 --- a/types/types_test.go +++ b/types/types_test.go @@ -3,7 +3,7 @@ package types_test import ( "testing" - "github.com/front-matter/commonmeta-go/types" + "commonmeta-go/types" ) func TestMetadata(t *testing.T) { diff --git a/utils/utils.go b/utils/utils.go index c18e4d7..93cc7ad 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -8,7 +8,7 @@ import ( "regexp" "strings" - "github.com/front-matter/commonmeta-go/doiutils" + "commonmeta/doiutils" "github.com/microcosm-cc/bluemonday" ) diff --git a/utils/utils_test.go b/utils/utils_test.go index eaa19a7..bb48ec0 100644 --- a/utils/utils_test.go +++ b/utils/utils_test.go @@ -3,7 +3,7 @@ package utils_test import ( "testing" - "github.com/front-matter/commonmeta-go/utils" + "commonmeta-go/utils" ) func TestNormalizeUrl(t *testing.T) {