variablesgocompiler-errorsredefine

golang compiler is saing that the program is redefineing variables, that haven't been redfeind


The compiler is saying that every variable that has been defined is being defined again 5 lines later and pulling up an error, off course i haven't redefined all my variables 5 lines later, how do i stop this bug? this an example of one of the structs

type Holder struct {
    Name  string
    Holders_need int
    Avail int
}

it is claiming that there is redifend on like 32 which is the line after the struct closes I HAVE FOUND THE ANSWER TO THIS


Solution

  • I have found the answer to my question thank you to those who tried to help, if anyone else has this problem check that your compiler isn't attempting to compiler the same program twice, as that is what was happening here!