2023年7月21日

go 循环链表

摘要: package main import ( "fmt" ) type Node struct{ Data int Next *Node } type CircularLinkedList struct { Head *Node Tail *Node } func NewCircularLinkedL 阅读全文

posted @ 2023-07-21 19:33 running-fly 阅读(8) 评论(0) 推荐(0) 编辑

go 结构体嵌套interface

摘要: package main import "fmt" //结构体嵌套接口,可以在结构体绑定的方法直接实现接口中的方法,直接调用接口中的方法 type aa interface{ a() b() } type world struct{ aa Age int } func(h world)a(){ fm 阅读全文

posted @ 2023-07-21 10:04 running-fly 阅读(5) 评论(0) 推荐(0) 编辑