From 33b45e57cb5ee11d59fbd9d8c58be39be2e11f56 Mon Sep 17 00:00:00 2001 From: Andrew W Date: Fri, 23 Sep 2022 23:08:12 -0500 Subject: [PATCH] updated status hashtag to be what was searched for --- .gitignore | 1 + main.go | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a34a5be..593f65e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build images *.yaml +deploy \ No newline at end of file diff --git a/main.go b/main.go index c0557e0..ce45dbd 100644 --- a/main.go +++ b/main.go @@ -57,6 +57,12 @@ func architectureBot() { photoIndex := rand.Intn(79) photo := ps.Photos[photoIndex] + hashtagString := "#" + hashtagArr := strings.Split(query, " ") + for _, v := range hashtagArr { + hashtagString += v + } + fmt.Println(hashtagString) // fmt.Println("Source Medium URL:", ps.Photos[0].Src.Medium) photoURL := photo.Src.Original mime := strings.Split(photoURL, "/") @@ -70,7 +76,7 @@ func architectureBot() { // fmt.Println("Original SRC URL: ", photoURL) - post := "Taken from " + photo.URL + "\n#neoclassical" + post := "Taken from " + photo.URL + "\n" + hashtagString domain := "https://" + viper.GetString("domain") if !viper.IsSet("NCD.ClientID") {