Use cases – postToConnectionOutput apigatewaymanagementapi Go

I'm trying to find a concrete example where that type is used, I can't find any on the whole internet, the documentation of the package is very advanced or doesn't give details.

It all started from trying to find an error that was "goneException" when using postToConnectionInput to a client that doesn't exist, well it's like that by default, but I thought I could find a more specific error message. That's when I got to postToConnectionOutput. How can I see it? How can I use it? Can it be used in my code example?

Note: I'm not asking about how to fix the goneException, it's an error by the way, I want to know more. Can I apply the postToConnectionOutput to my example and what would it do for me?

I mention that I don't know the language to the maximum, there are some things that I don't understand well, then I put a function that what it does is send a message to all the connected clients, everything works fine, except that I INTENTIONALLY put an ID that doesn't exist, and I would like to know if I can get more information about what happens, not just a "goneException" Can postToConnectionOutput be used, what would it be for? I also leave below the types of goolang and the associated documentation.

My code, use postToConnectionInput:
All errors: goneException (correct!) I can see more with postToConnectionOutput What does postToConnectionOutput? and And how is it implemented?
https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/apigatewaymanagementapi#PostToConnectionInput

I don't understand what the function of postToConnectionOutput is and how it is implemented, I tried, I searched many places, I couldn't. Can postToConnectionOutput be applied to my code? What good would it do me? What do I do with that?

Thank you very much if someone could explain or tell me, or give me an example, or what it is for. Grateful.

func sendAll(r events.APIGatewayWebsocketProxyRequest) (interface{}, error) {
    idCon := r.RequestContext.ConnectionID
    cantidadClientes := strconv.Itoa(len(ListaClientes))
    fmt.Println("sendAll ejecutada, ID DE CONEXIN (emisor): ", idCon, "cantidad de clientes: ["+cantidadClientes+"]")
    mensaje := "Este es un mensaje para todos"

    mySession := session.Must(session.NewSession())
    api := apigatewaymanagementapi.New(mySession, aws.NewConfig().WithEndpoint("xxxxxxxxxxxxxxxxxxxxx"))

    for _, idcliente := range ListaClientes {
        structRes := &apigatewaymanagementapi.PostToConnectionInput{
            ConnectionId: aws.String(idcliente), 
            Data:         []byte(mensaje),
        }

        _, err := api.PostToConnection(structRes)
        if err != nil {
            fmt.Println("WARNING, sendAll(), idconexin: ["+idcliente+"]->", err, "<-")
            if awsErr, ok := err.(awserr.Error); ok {
                log.Println("Error:", awsErr.Code(), awsErr.Message())
                log.Println("Error:", awsErr)
                fmt.Println("ee: ", errors.Unwrap(awsErr))
                if origErr := errors.Unwrap(awsErr); origErr != nil {
                    fmt.Println(origErr)
                }
            }
            x := fmt.Errorf("%w", err)
            fmt.Println(x)
            fmt.Println(fmt.Printf("%v", x))
            var gne *apitypes.GoneException
            if errors.As(err, &gne) {
                log.Println("error:", gne.Error())
            }
        }

    }
    return events.APIGatewayProxyResponse{
        StatusCode: 200,
    }, nil
}

Js validate string (not working?), but number run ok. js / php.

Hello. I have this code.

I want to show 'correcto' when 'response' is 'ola', but not working.

I have this procedure to do it fails:

-Change php response (echo) to number,, echo "ola"; to echo "25";
-Change javascript,, if(response == 'ola') to if(response == 25)

<script src="jquery-3.5.1.min.js"></script>
    $.ajax({
    type: "POST",
    url: 'logic/perfil_comp2.php',
    data: CRUDinfo,
    //dataType: "json",
    success: function(response){
              //var respuesta = '';
              //respuesta = response;
              console.log(typeof(response)); //SHOW 'string'
              console.log(response); //SHOW 'ola' (without '')
              if(response == 'ola') {
              alert("correcto");
              }else{
              alert("Error "); //AND SHOW 'Error' when console.log = ola 
              }
            }
       });

What is the reason why tell me that "ola" is not equal to "ola"? Remember that console.log shows me "ola" and "string". But if change to number works fine.

Best regards. and thanks.

How to get text from different elements, with a single function.

Hello.
It is something very simple for someone who knows javascript.
How to capture the text content of the pressed element? Important is that the page is built with PHP.

<li><a onclick='cat();' href='#'>Text 1</a></li>
<li><a onclick='cat();' href='#'>Text 2</a></li>
<!-- Above PHP, important: text content element is dinamic-->
<script>
  function cat() {
  var x = ?? /*Text 1 or text 2 or any PHP text*/
    console.log(x);

}
</script>

Thank you very much