editor fields define
This commit is contained in:
parent
d6e8813fef
commit
ae5ed74601
|
|
@ -6,11 +6,29 @@
|
||||||
|
|
||||||
package xdb
|
package xdb
|
||||||
|
|
||||||
|
import "container/list"
|
||||||
|
|
||||||
type Editor struct {
|
type Editor struct {
|
||||||
|
// source ip file
|
||||||
|
srcFile string
|
||||||
|
dstFile string
|
||||||
|
|
||||||
|
// region info
|
||||||
|
region map[int]string
|
||||||
|
|
||||||
|
// segments list
|
||||||
|
segments *list.List
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewEditor(srcFile string) (*Editor, error) {
|
func NewEditor(srcFile string, dstFile string) (*Editor, error) {
|
||||||
return nil, nil
|
e := &Editor{
|
||||||
|
srcFile: srcFile,
|
||||||
|
dstFile: dstFile,
|
||||||
|
|
||||||
|
region: map[int]string{},
|
||||||
|
segments: list.New(),
|
||||||
|
}
|
||||||
|
return e, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Editor) Put(ip string) error {
|
func (e *Editor) Put(ip string) error {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue