mirror of
https://github.com/jwetzell/osc-go.git
synced 2026-08-13 02:53:38 +00:00
chore: go fix
This commit is contained in:
@@ -222,7 +222,7 @@ func send(host string, port int32, address string, args []string, types []string
|
||||
oscMessageBuffer = append(sizeBytes, oscMessageBuffer...)
|
||||
}
|
||||
|
||||
netAddress := fmt.Sprintf("%s:%d", host, port)
|
||||
netAddress := net.JoinHostPort(host, fmt.Sprintf("%d", port))
|
||||
conn, err := net.Dial(protocol, netAddress)
|
||||
if err != nil {
|
||||
fmt.Printf("Dial err %v", err)
|
||||
|
||||
@@ -17,7 +17,7 @@ func stringToOSCBytes(rawString string) []byte {
|
||||
|
||||
padLength := 4 - (len(sb.String()) % 4)
|
||||
if padLength < 4 {
|
||||
for i := 0; i < padLength; i++ {
|
||||
for range padLength {
|
||||
sb.WriteString("\u0000")
|
||||
}
|
||||
}
|
||||
@@ -69,7 +69,7 @@ func byteArrayToOSCBytes(bytes []byte) []byte {
|
||||
|
||||
padLength := 4 - (bytesSize % 4)
|
||||
if padLength < 4 {
|
||||
for i := 0; i < padLength; i++ {
|
||||
for range padLength {
|
||||
oscBytes = append(oscBytes, 0)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user