From 8b4bdf625f3c9080a0ba7baa2401fe528c8e828d Mon Sep 17 00:00:00 2001
From: Captain ALM
- My CV is available in the following formats: ( DOCX | PDF ) + My CV is available in the following formats: ( DOCX | PDF )
thumbnailLocation: "resources/assets/imageofyou_t.jpg" imageLocation: "resources/assets/imageofyou.jpg" diff --git a/pageHandler/pages/index/about.go b/pageHandler/pages/index/about.go index 0fe9070..638bd0d 100644 --- a/pageHandler/pages/index/about.go +++ b/pageHandler/pages/index/about.go @@ -18,7 +18,8 @@ type AboutYaml struct { } func (ay AboutYaml) GetContent() template.HTML { - return template.HTML(strings.ReplaceAll(strings.ReplaceAll(ay.Content, "#age#", strconv.Itoa(ay.GetAge())), "#birth#", strconv.Itoa(ay.BirthYear))) + r := strings.NewReplacer("#age#", strconv.Itoa(ay.GetAge()), "#birth#", strconv.Itoa(ay.BirthYear), "#year#", strconv.Itoa(time.Now().Year())) + return template.HTML(r.Replace(ay.Content)) } func (ay AboutYaml) GetAge() int {