LittleDemon WebShell


Linux in-mum-web1499.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64
Path : /opt/golang/1.22.0/src/cmd/compile/internal/ssa/testdata/
File Upload :
Command :
Current File : //opt/golang/1.22.0/src/cmd/compile/internal/ssa/testdata/pushback.go

package main

type Node struct {
	Circular bool
}

type ExtNode[V any] struct {
	v V
	Node
}

type List[V any] struct {
	root *ExtNode[V]
	len  int
}

func (list *List[V]) PushBack(arg V) {
	if list.len == 0 {
		list.root = &ExtNode[V]{v: arg}
		list.root.Circular = true
		list.len++
		return
	}
	list.len++
}

func main() {
	var v List[int]
	v.PushBack(1)
}

LittleDemon - FACEBOOK
[ KELUAR ]