From d0e76f2d63ac3d3d50c4cf194c90a553255750ab Mon Sep 17 00:00:00 2001 From: Kaspars Date: Thu, 25 Nov 2021 22:52:37 +0200 Subject: [PATCH] Small fix to examples --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f04b306..e94c98f 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Time by time needs to parse really huge sitemaps. If you just unmarshal the whol The solution is to handle sitemap entries on the fly. That is read one entity, consume it, repeat while there are unhandled items in the sitemap. ```golang -err := sitemap.ParseFromFile("./testdata/sitemap.xml", func(e Entry) error { +err := sitemap.ParseFromFile("./testdata/sitemap.xml", func(e sitemap.Entry) error { return fmt.Println(e.GetLocation()) }) ``` @@ -23,7 +23,7 @@ Yes. Of course, you can just load a sitemap to memory. ```golang result := make([]string, 0, 0) -err := sitemap.ParseIndexFromFile("./testdata/sitemap-index.xml", func(e IndexEntry) error { +err := sitemap.ParseIndexFromFile("./testdata/sitemap-index.xml", func(e sitemap.IndexEntry) error { result = append(result, e.GetLocation()) return nil })