glGetAttribLocation return -1

I’m trying to send glUniform1i as always, but for some reason glGetAttribLocation returns -1
С++:

glUseProgram(pomehi.GetShaderID());
int loc = glGetAttribLocation(pomehi.GetShaderID(), "line");
glUniform1i(loc, 2);

GLSL:

out vec4 cvetPiks;

uniform int line;

void main()
{
    vec3 col = vec3(0.f, 0.f, 0.f, 1.f);
    if (line == 2)
    {
        col = vec3(1.f);
    }

    cvetPiks = vec4(col, 1.0);
}

OpengGL does not generate errors, but for some reason it does not return the attribute location, what should I do in this case?

“line” is a uniform, not an attribute. So you need to use glGetUniformLocation.

Ah, it’s terrible, damn it. I’ve been dumb for so long, I just used the wrong word in the command, God. thank you very much