SoFunction
Updated on 2025-03-04

Solution to prompt %! (NOVERB) in use of go language

Under what circumstances will it occur?

var hourPaidSuccessFenzi = (10)
var	alertName = ("Payment success rate alarm, summary payment success rate is lower than %s%", ()),
(alertName)

The operation result will be:

Payment success rate alarm,Summary payment success rate is lower than10%!(NOVERB)

Why is this happening?

This is because % is a symbol for strings to participate in escape, such as %s, %v, %d, etc. . .

The emergence of %!(NOVERB) is a safe escape mechanism for the GO language. How to avoid such a situation?

// Use double percent sign %% instead of meaningless single percent % such as:var hourPaidSuccessFenzi = (10)
var	alertName = ("Payment success rate alarm, summary payment success rate is lower than %s%", ()),
(alertName)

The final result is:

Payment success rate alarm,Summary payment success rate is lower than10%

Go is a simple, efficient and highly concurrent programming language suitable for building reliable and high-performance software systems. It is simple to use while maintaining efficiency and scalability. Go language supports garbage collection mechanism, has strong concurrent programming capabilities, and can easily handle large-scale concurrent tasks. It also has a rich standard library and an active development community, allowing developers to quickly build high-quality applications. The emergence of Go provides developers with a new choice, which has great advantages in performance and development efficiency. With the continuous development and improvement of Go language, I believe it will play an increasingly important role in the future software development field.

This is the article about the solution to using go language prompts %! (NOVERB). For more related go language %! (NOVERB) content, please search for my previous articles or continue browsing the related articles below. I hope everyone will support me in the future!