1
0
mirror of https://github.com/ManyakRus/starter.git synced 2025-11-25 23:02:22 +02:00

сделал FillMessageTelegramFromMessage()

This commit is contained in:
Nikitin Aleksandr
2024-06-19 13:58:01 +03:00
parent c6d5b65f88
commit b2cd7c773a
4 changed files with 186 additions and 1 deletions

View File

@@ -797,3 +797,35 @@ func TestSortkMapStringInt(t *testing.T) {
})
}
}
func TestIsNilInterface(t *testing.T) {
// Testing for a nil pointer interface
var ptr *int
if !IsNilInterface(ptr) {
t.Error("Expected true for nil pointer interface")
}
// Testing for a nil slice interface
var slice []int
if !IsNilInterface(slice) {
t.Error("Expected true for nil slice interface")
}
// Testing for a non-nil map interface
m := make(map[string]int)
if IsNilInterface(m) {
t.Error("Expected false for non-nil map interface")
}
// Testing for a nil function interface
var fn func()
if !IsNilInterface(fn) {
t.Error("Expected true for nil function interface")
}
// Testing for a nil interface
var i interface{}
if !IsNilInterface(i) {
t.Error("Expected true for nil interface")
}
}