Exemple #1
0
func Test_Cyan_1(t *testing.T) {
	expected := "\x1b[36mpolru\x1b[39;49m"
	actual := Color.Cyan("polru", true)
	if actual != expected {
		t.Errorf("Test failed, expected: '%s', got: '%s'", expected, actual)
	}
}
Exemple #2
0
func Test_Cyan_2(t *testing.T) {
	expected := "polru"
	actual := Color.Cyan("polru", false)
	if actual != expected {
		t.Errorf("Test failed, expected: '%s', got: '%s'", expected, actual)
	}
}
func printGeolocationByDate(tweets []Tweet, color bool) {
	for _, tweet := range tweets {
		if tweet.Locatable {
			fmt.Printf(" %s  (%s)%s,%s within %v\n", tweet.Date, Color.Cyan(tweet.PlaceType, color), Color.Green(tweet.Place, color), Color.Green(tweet.Country, color), tweet.Location)
		}
	}
}