Skip to content

Commit c3d29c7

Browse files
authored
Fix: Add a 'min' function to work with go1.18.1, the default on Ubuntu 22.04. (#54)
1 parent c4cf4bf commit c3d29c7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

utility/application.go

+7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ const (
1313
SAMPLE = 10240
1414
)
1515

16+
func min(a, b int) int {
17+
if a < b {
18+
return a
19+
}
20+
return b
21+
}
22+
1623
func SendMessage(input string, client string) {
1724
conn, err := net.Dial(CONN_TYPE, client)
1825
if err != nil {

0 commit comments

Comments
 (0)