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

сделал telegram_client.go

This commit is contained in:
Nikitin Aleksandr
2023-05-19 16:05:54 +03:00
parent c03e2072bd
commit 53f4efc185
3465 changed files with 731510 additions and 24593 deletions

View File

@@ -290,7 +290,7 @@ func Trim(s string) string {
return Otvet
}
// Max returns the larger of x or y.
// Max returns the largest of x or y.
func Max(x, y int) int {
if x < y {
return y
@@ -298,7 +298,7 @@ func Max(x, y int) int {
return x
}
// Min returns the smaller of x or y.
// Min returns the smallest of x or y.
func Min(x, y int) int {
if x > y {
return y
@@ -306,7 +306,7 @@ func Min(x, y int) int {
return x
}
// Max returns the larger of x or y.
// Max returns the largest of x or y.
func MaxInt64(x, y int64) int64 {
if x < y {
return y
@@ -314,7 +314,7 @@ func MaxInt64(x, y int64) int64 {
return x
}
// Min returns the smaller of x or y.
// Min returns the smallest of x or y.
func MinInt64(x, y int64) int64 {
if x > y {
return y
@@ -322,6 +322,22 @@ func MinInt64(x, y int64) int64 {
return x
}
// MaxDate returns the largest of x or y.
func MaxDate(x, y time.Time) time.Time {
if x.Before(y) == true {
return y
}
return x
}
// MinDate returns the smallest of x or y.
func MinDate(x, y time.Time) time.Time {
if x.Before(y) == false {
return y
}
return x
}
// GoGo - запускает функцию в отдельном потоке
func GoGo(ctx context.Context, fn func() error) error {
var err error