From a279e1e5907d8558cbf72df8e16f3e5f1d59e571 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 22 Jan 2020 23:48:33 +0300 Subject: [PATCH] Rename BaseURL, because it is used only for Atom --- cmd/sgblog/main.go | 12 ++++++------ common.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/sgblog/main.go b/cmd/sgblog/main.go index 2173580..667c301 100644 --- a/cmd/sgblog/main.go +++ b/cmd/sgblog/main.go @@ -77,11 +77,11 @@ type Cfg struct { Branch string Title string - BaseURL string URLPrefix string - AtomId string - AtomAuthor string + AtomBaseURL string + AtomId string + AtomAuthor string CSS string Webmaster string @@ -262,8 +262,8 @@ func main() { etagHash.Write([]byte(cfg.GitPath)) etagHash.Write([]byte(cfg.Branch)) etagHash.Write([]byte(cfg.Title)) - etagHash.Write([]byte(cfg.BaseURL)) etagHash.Write([]byte(cfg.URLPrefix)) + etagHash.Write([]byte(cfg.AtomBaseURL)) etagHash.Write([]byte(cfg.AtomId)) etagHash.Write([]byte(cfg.AtomAuthor)) @@ -291,7 +291,7 @@ func main() { } defaultLinks = append(defaultLinks, ``) - atomURL := cfg.BaseURL + cfg.URLPrefix + "/" + AtomFeed + atomURL := cfg.AtomBaseURL + cfg.URLPrefix + "/" + AtomFeed defaultLinks = append(defaultLinks, ``) repo, err = git.PlainOpen(cfg.GitPath) @@ -494,7 +494,7 @@ func main() { ID: "urn:uuid:" + feedId, Link: []atom.Link{{ Rel: "alternate", - Href: cfg.BaseURL + cfg.URLPrefix + "/" + commit.Hash.String(), + Href: cfg.AtomBaseURL + cfg.URLPrefix + "/" + commit.Hash.String(), }}, Published: atom.Time(commit.Author.When), Updated: atom.Time(commit.Author.When), diff --git a/common.go b/common.go index a9b2a6d..8d92801 100644 --- a/common.go +++ b/common.go @@ -3,5 +3,5 @@ package sgblog const ( WhenFmt = "2006-01-02 15:04:05Z07:00" - Version = "0.3.1" + Version = "0.3.2" ) -- 2.44.0