mirror of
https://github.com/lionsoul2014/ip2region.git
synced 2025-12-08 19:25:22 +00:00
editor fields define
This commit is contained in:
parent
d6e8813fef
commit
ae5ed74601
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user