Go fmt
This commit is contained in:
@ -18,6 +18,7 @@ func color(c int) string {
|
||||
return fmt.Sprintf("\033[0;%dm", 29+c)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO maybe make the text into some datastructure which remembers the color
|
||||
func colorText(text string, color string, offColor string) string {
|
||||
return fmt.Sprintf("%s%s%s", color, text, offColor)
|
||||
|
||||
6
main.go
6
main.go
@ -143,7 +143,7 @@ func sendChat(message string) {
|
||||
func formatOutput(api keybase.ChatAPI) string {
|
||||
ret := ""
|
||||
msgType := api.Msg.Content.Type
|
||||
switch (msgType) {
|
||||
switch msgType {
|
||||
case "text", "attachment":
|
||||
var c = messageHeaderColor
|
||||
ret = colorText(outputFormat, c, noColor)
|
||||
@ -180,9 +180,9 @@ func populateList() {
|
||||
} else {
|
||||
|
||||
clearView("List")
|
||||
var recentPMs = fmt.Sprintf("%s---[PMs]---%s\n", channelsHeaderColor, channelsColor);
|
||||
var recentPMs = fmt.Sprintf("%s---[PMs]---%s\n", channelsHeaderColor, channelsColor)
|
||||
var recentPMsCount = 0
|
||||
var recentChannels = fmt.Sprintf("%s---[Teams]---%s\n", channelsHeaderColor, channelsColor);
|
||||
var recentChannels = fmt.Sprintf("%s---[Teams]---%s\n", channelsHeaderColor, channelsColor)
|
||||
var recentChannelsCount = 0
|
||||
for _, s := range testVar.Result.Conversations {
|
||||
channels = append(channels, s.Channel)
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
package main
|
||||
|
||||
// Path where Downloaded files will default to
|
||||
var downloadPath = "/tmp/"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user