编辑代码

package main
import "fmt"
type USB interface{
    read()
    wirte()
}
type Computer struct{}
type Mobile struct{}
func(c Computer) read(){
    fmt.Println("computer read...")
}
func (c Computer) write() {
    fmt.Println("computer write...")
}
func (m Mobile) read() {
    fmt.Println("mobile read...")
}

func (m Mobile) write() {
    fmt.Println("mobile write...")
}
func main () {
    c := Computer{}
    m := Mobile{}
    c.read()
    c.write()
    m.read()
    m.write()
}