Fixing typos

This commit is contained in:
teivah 2022-01-31 21:11:09 +01:00
parent 727ecfbc94
commit 58d014a963
No known key found for this signature in database
GPG key ID: 07E4A13FB8F8DF63
3 changed files with 7 additions and 5 deletions

View file

@ -31,7 +31,7 @@ func getKeysGenerics[K comparable, V any](m map[K]V) []K {
} }
type customConstraint interface { type customConstraint interface {
~int | ~string <1> ~int | ~string
} }
func getKeysWithConstraing[K customConstraint, V any](m map[K]V) []K { func getKeysWithConstraing[K customConstraint, V any](m map[K]V) []K {
@ -65,4 +65,4 @@ func main() {
} }
sort.Sort(s) sort.Sort(s)
fmt.Println(s.S) fmt.Println(s.S)
} }

View file

@ -77,4 +77,6 @@ func listing5() {
defer mutex.Unlock() defer mutex.Unlock()
i = 2 i = 2
}() }()
_ = i
} }

View file

@ -7,9 +7,9 @@ import (
func TestCache_TrimBefore(t *testing.T) { func TestCache_TrimBefore(t *testing.T) {
events := []Event{ events := []Event{
{Timestamp: time.Now().Add(-20 * time.Millisecond)}, {Timestamp: parseTime(t, "2020-01-01T12:00:00.04Z")},
{Timestamp: time.Now().Add(-10 * time.Millisecond)}, {Timestamp: parseTime(t, "2020-01-01T12:00:00.05Z")},
{Timestamp: time.Now().Add(10 * time.Millisecond)}, {Timestamp: parseTime(t, "2020-01-01T12:00:00.06Z")},
} }
cache := &Cache{} cache := &Cache{}
cache.Add(events) cache.Add(events)