gitlab.com/Raven-IO/raven-delve@v1.22.4/_fixtures/locationsprog2.go (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  	"runtime"
     6  )
     7  
     8  func afunction(s string) {
     9  	fmt.Println(s)
    10  }
    11  
    12  type someStruct struct {
    13  	s string
    14  }
    15  
    16  func (o *someStruct) structfunc(s2 string) {
    17  	fmt.Println(o.s, s2)
    18  }
    19  
    20  func main() {
    21  	fn1 := afunction
    22  	var o someStruct
    23  	fn2 := o.structfunc
    24  	fn3 := func(s string) {
    25  		fmt.Println("inline", s)
    26  	}
    27  	runtime.Breakpoint()
    28  	fn1("test")
    29  	afunction("test")
    30  	fmt.Println(fn1, fn2, fn3, o)
    31  }