The type of method binding of golang, when to pass the value and when to pass the pointer?

the type of method binding of golang, when to pass the value and when to pass the pointer?
I have seen the following two ways of writing, but I don"t know how to distinguish between them. Please give me some guidance:

func (s *Widget) Do() {
  //...
}

func (s Widget) Do() {
  //...
}
Dec.24,2021

package main

import "fmt"

type ABC struct {
    data string
}

//
func (a ABC) delete() {

    a.data = ""
}

//
func (a *ABC) pdelete() {
    a.data = ""
}

func main() {
    A := ABC{"123"}
    fmt.Println(1, A.data)

    //
    A.delete()
    fmt.Println(2, A.data)

    //,
    A.pdelete()
    fmt.Println(3, A.data)

}

/* 
1 123
2 123
3 */
Menu