在 go 模板中,我想用变量替换下面的字符串:
bot := DigitalAssistant{"bobisyouruncle", "teamAwesome", "awesomebotimagename", "0.1.0", 1, 8000, "health", "fakeperson@gmail.com"}
假设我想bobisyouruncle
用变量替换input
在js中这很简单:
bot := DigitalAssistant{`${input}`, "teamAwesome", "awesomebotimagename", "0.1.0", 1, 8000, "health", "fakeperson@gmail.com"}
繁星coding
相关分类