爲日誌消息或stderr消息編寫長的信息字符串通常很不錯。 Python的處理這與逗號分隔字符串文字,如:Go中的解釋字符串文字
log.warn("The operation failed on the %d iteration. "
"Resumed on the %d iteration.",
failed, resumed)
圍棋似乎對原始字符串字面量的解決方案,通過使用反引號,但我找不到解釋字符串字面任何風格指南。我是否錯過了一些東西,或者有沒有選擇,只能使用一個變量?例如。
msg := fmt.Sprintf("The operation failed on the %d iteration. ", failed)
msg += fmt.Sprintf("Resumed on the %d iteration.", resumed)
log.println(msg)
你真正要問的是如何在源文件的下一行繼續聲明。正確? – RickyA 2014-10-06 13:08:16