A temporary fix

This commit is contained in:
cyp0633 2022-06-06 15:43:43 +08:00
parent eb3ea6df7c
commit eaf2eb9a96
Signed by: cyp0633
GPG Key ID: E1BC508A994A5138
1 changed files with 3 additions and 3 deletions

View File

@ -8,16 +8,16 @@ import (
func main() {
var availableSlave []int
var n,temp int
var n, temp int
fmt.Println("Input the number of slaves:")
fmt.Scan(&n)
fmt.Println("Input the available slaves:")
for i := 0; i < n; i++ {
fmt.Scanf("%d", temp)
fmt.Scanf("%v", &temp)
availableSlave = append(availableSlave, temp)
}
fmt.Println("Checking available slaves...")
for i :=range availableSlave{
for _, i := range availableSlave {
if !tools.CheckSlave(i, 0) {
fmt.Println("Slave", i, "is not available")
os.Exit(0)