Created
July 28, 2017 18:35
-
-
Save gerep/3162049db05dc07b027f3ec4adeebd18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
newPrice = fmt.Sprintf("%.2f", (current.Price*c.DiscountValue)/100) | |
current.NewPrice, err = strconv.ParseFloat(newPrice, 64) | |
if err != nil { | |
current.Message = "Ocorreu um erro ao calcular o novo valor deste produto: " + err.Error() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment