Created
August 12, 2018 19:35
-
-
Save yeukhon/60a4475c824d7597665a3097cd18b4f4 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
// NOTE: Ideally we want this kind of output, rather than hardcoing slicing up to 6 chars. | |
// fmt.Printf("%-13.4f\n", RedIt(StrToNum(stock.Open) - StrToNum(stock.Price))) | |
// fmt.Printf("%-13s\n", "\x1b[31;1m" + stock.Price + "\x1b[0m") | |
// I get multiple-value fmt.Printf() in single-value context if: | |
// fmt.Printf("%-13s\n", "\x1b[31;1m" + fmt.Sprint(fmt.Printf("%.4f", "num)) + "\x1b[0m") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment