在代码中,我尝试做一些操作
is_html := false;
// Check, if HTMl is exist
for i := 0; i < len(modules_arr); i++ {
if modules_arr[i] == "html" { is_html := true }
}
if is_html ==true
{
fmt.Printf("%v", "asdasd")
}
Run Code Online (Sandbox Code Playgroud)
但是我收到一个错误:
./api.go:26: missing condition in if statement
./api.go:26: is_html == true evaluated but not used
Error: process exited with code 2.
Run Code Online (Sandbox Code Playgroud)