From ae5ed7460183004a7dea58b4353d9f6958841f33 Mon Sep 17 00:00:00 2001 From: Lion Date: Thu, 1 Dec 2022 18:10:54 +0800 Subject: [PATCH] editor fields define --- maker/golang/xdb/editor.go | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/maker/golang/xdb/editor.go b/maker/golang/xdb/editor.go index 1b1c898..9a59870 100644 --- a/maker/golang/xdb/editor.go +++ b/maker/golang/xdb/editor.go @@ -6,11 +6,29 @@ package xdb +import "container/list" + 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) { - return nil, nil +func NewEditor(srcFile string, dstFile string) (*Editor, error) { + e := &Editor{ + srcFile: srcFile, + dstFile: dstFile, + + region: map[int]string{}, + segments: list.New(), + } + return e, nil } func (e *Editor) Put(ip string) error {