QuackatronHQ / Gigarepo

Unused code SCC-U1000
Bug risk
Major
9 occurrences in this check
func imageIndex is unused
 8	"math"
 9)
10
11func imageIndex(img []image.Image, find image.Image) int {12	for i, _ := range img {
13		if img[i] == find {
14			return i
func imageCopyA is unused
17	return -1
18}
19
20func imageCopyA(src []image.Image, dst []image.Image) {21	for i, img := range src {
22		dst[i] = img
23	}
func imageCopyB is unused
23	}
24}
25
26func imageCopyB(src []image.Image) (dst []image.Image) {27	dst = make([]image.Image, 0, len(src))
28	for _, img := range src {
29		dst = append(dst, img)
func equalCompare is unused
49	return sig, func() { close(sig) }
50}
51
52func equalCompare(a, b any) (bool, error) {53	typeEql := reflect.TypeOf(a) == reflect.TypeOf(b)
54	if typeEql == false {
55		return false, errors.New(fmt.Sprintf("type equality: %v", typeEql))
func empty is unused
66	}
67}
68
69func empty(s string) bool {70	if len(s) == 0 {
71		return true
72	}
func timer is unused
73	return false
74}
75
76func timer(t0 time.Time) time.Duration {77	dur := time.Now().Sub(t0)
78	return dur
79}
func join is unused
78	return dur
79}
80
81func join(s []string) string {82	return strings.Join(s[:], " ")
83}
84
func swap is unused
82	return strings.Join(s[:], " ")
83}
84
85func swap(a, b int) (int, int) {86	temp := a
87	a = a
88	b = temp
func dialSSH is unused
28	}
29}
30
31func dialSSH(user, password, host string, port int) (*ssh.Client, func()) {32	var auths []ssh.AuthMethod
33	aconn, err := net.Dial("unix", os.Getenv("SSH_AUTH_SOCK"))
34	if err == nil {