File: plugin2.go

package info (click to toggle)
delve 1.24.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 14,092 kB
  • sloc: ansic: 111,943; sh: 169; asm: 141; makefile: 43; python: 23
file content (33 lines) | stat: -rw-r--r-- 543 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main

import (
	"fmt"
	"github.com/go-delve/delve/_fixtures/internal/pluginsupport"
)

func Fn2() string {
	return "world"
}

type asomethingelse struct {
	x, y float64
}

func (a *asomethingelse) Callback2(n, m int) float64 {
	r := a.x + 2*a.y
	r += float64(n) / float64(m)
	return r
}

func TypesTest(s pluginsupport.Something) pluginsupport.SomethingElse {
	if A != nil {
		aIsNotNil(fmt.Sprintf("%s", A))
	}
	return &asomethingelse{1.0, float64(s.Callback(2))}
}

var A interface{}

func aIsNotNil(str string) {
	// nothing here
}