golanglearn/interface/example1/sensor/sensorimpl/ftp.go

31 lines
395 B
Go

package sensorimpl
import (
"fmt"
"golanglearn/interface/example1/sensor"
)
type Ftp struct {
Name string
}
func (f *Ftp) Add() {
fmt.Println("ftp sensor", f.Name)
}
func (f *Ftp) Delete() {
panic("implement me")
}
func (f *Ftp) Update() {
panic("implement me")
}
func (f *Ftp) Search() {
panic("implement me")
}
func NewFtp(name string) sensor.Sensor {
return &Ftp{Name: name}
}