A question about the pointer of this place

I feel that pointers are not needed at all in this place. Why do I see many related examples using pointers? There is some doubt

package main

import (
    "fmt"
    "net/http"
)

type MyMux struct {
}
//
func (p *MyMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {
    if r.URL.Path == "/" {
        sayhelloName(w, r)
        return
    }
    http.NotFound(w, r)
    return
}

func sayhelloName(w http.ResponseWriter, r *http.Request) {
    fmt.Fprintf(w, "Hello myroute!")
}

func main() {
    mux := &MyMux{}
    http.ListenAndServe(":9090", mux)
}
Apr.01,2021

there is no need at all in your question

A pointer is needed only if you need to read struct private members, otherwise you don't need

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b38108-2c0ee.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b38108-2c0ee.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?