From c12028da38c88bb621f742435ef3b6fdb41686b3 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Tue, 19 Jan 2021 19:44:49 +0000 Subject: [PATCH] Update main.go --- cmd/docgen/main.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/docgen/main.go b/cmd/docgen/main.go index dc13eaa..f5baa7a 100644 --- a/cmd/docgen/main.go +++ b/cmd/docgen/main.go @@ -16,7 +16,10 @@ import ( "github.com/stoewer/go-strcase" ) -const postContentPath = "docs/hugo-tania/site/content/post" +const ( + postContentPath = "docs/hugo-tania/site/content/post" + docsURL = "services.m3o.com" +) func main() { files, err := ioutil.ReadDir(os.Args[1]) @@ -26,7 +29,7 @@ func main() { workDir, _ := os.Getwd() docPath := filepath.Join(workDir, "docs") - err = ioutil.WriteFile(filepath.Join(docPath, "CNAME"), []byte("services.m3o.com"), 0777) + err = ioutil.WriteFile(filepath.Join(docPath, "CNAME"), []byte(docsURL), 0777) if err != nil { fmt.Printf("Failed to CNAME") os.Exit(1)