golang单链表基本操作

package mainimport (“fmt”)type ElemType int// 定义单单链表的结构体type Node struct {data ElemType // 数据域next *Node // 指针域(存放后继节点地址)}