空格對于縮進 url、sql 查詢很有用,以使其更具可讀性。有沒有辦法在 golang 編譯時從 const 字符串中刪除字符?ex: (runtime version)const url = `https://example.com/path?attr1=test&attr2=test`// this is the code to be replacedurlTrim := strings.Replace(strings.Replace(url, "\n", "", -1))
- 0 回答
- 0 關注
- 148 瀏覽
添加回答
舉報
0/150
提交
取消