From 3b276971774b8e4c39eadc292972e07e831a4801 Mon Sep 17 00:00:00 2001 From: starainrt Date: Fri, 3 Feb 2023 14:20:02 +0800 Subject: [PATCH] update go mod --- go.mod | 18 +++++++++--------- go.sum | 35 +++++++++++++++++------------------ standed.go | 1 - starlog.go | 3 +++ 4 files changed, 29 insertions(+), 28 deletions(-) diff --git a/go.mod b/go.mod index af6e31b..7c104ed 100644 --- a/go.mod +++ b/go.mod @@ -1,20 +1,20 @@ module b612.me/starlog -go 1.18 +go 1.16 require ( - b612.me/starmap v1.2.1 - b612.me/staros v1.1.4 - golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c + b612.me/starmap v1.2.2 + b612.me/staros v1.1.5 + golang.org/x/sys v0.4.0 ) require ( - b612.me/notify v1.2.0 // indirect - b612.me/starcrypto v0.0.1 // indirect + b612.me/notify v1.2.3 // indirect + b612.me/starcrypto v0.0.2 // indirect b612.me/stario v0.0.7 // indirect - b612.me/starnet v0.1.3 // indirect + b612.me/starnet v0.1.6 // indirect b612.me/win32api v0.0.1 // indirect - b612.me/wincmd v0.0.1 // indirect - golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect + b612.me/wincmd v0.0.2 // indirect + golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064 // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect ) diff --git a/go.sum b/go.sum index 99db523..ca38223 100644 --- a/go.sum +++ b/go.sum @@ -1,31 +1,30 @@ -b612.me/notify v1.2.0 h1:RedXNMLqY+TozalmdIUM27EFvZp06pzeqHn/F9G1eEs= -b612.me/notify v1.2.0/go.mod h1:EPctpKCVnoZO1hUJTRYpOw3huTemua+SGNIuUCsnzOc= -b612.me/starcrypto v0.0.1 h1:xGngzXPUrVbqtWzNw2e+0eWsdG7GG1/X+ONDGIzdriI= -b612.me/starcrypto v0.0.1/go.mod h1:hz0xRnfWNpYOlVrIPoGrQOWPibq4YiUZ7qN5tsQbzPo= -b612.me/stario v0.0.5/go.mod h1:or4ssWcxQSjMeu+hRKEgtp0X517b3zdlEOAms8Qscvw= +b612.me/notify v1.2.3 h1:4w5zDakubC8jIPg4JT8DANczSMxRhwEFjM/2A0dvuvY= +b612.me/notify v1.2.3/go.mod h1:VV29yq3KXTKJKSSjr5yS9bD2c2MGzuypYalfL9yGQ6M= +b612.me/starcrypto v0.0.2 h1:aRf1HcqK8GqHYxLAhWfFC4W/EqQLEFNEmxsBu3wG30o= +b612.me/starcrypto v0.0.2/go.mod h1:hz0xRnfWNpYOlVrIPoGrQOWPibq4YiUZ7qN5tsQbzPo= b612.me/stario v0.0.7 h1:QbQcsHCVLE6vRgVrPN4+9DGiSaC6IWdtm4ClL2tpMUg= b612.me/stario v0.0.7/go.mod h1:or4ssWcxQSjMeu+hRKEgtp0X517b3zdlEOAms8Qscvw= -b612.me/starmap v1.2.1 h1:fil0pyjYGZrioB0OJx+qhmJjrl+PooGEmfRI3yOm/fY= -b612.me/starmap v1.2.1/go.mod h1:m3m0CkkXqlel1FBBJVZ8ViIFfeWAej91BTemGfGSJLQ= -b612.me/starnet v0.1.3 h1:UjY6M96gdPdJtxnQGzCttqSwFw93sDZSHiIGtdOlFfk= -b612.me/starnet v0.1.3/go.mod h1:j/dd6BKwQK80O4gfbGYg2aYtPH76gSdgpuKboK/DwN4= -b612.me/staros v1.1.4 h1:Ikh74tYMqXkDHXJHArVf1/yhLMORfwZ+q8clAKvYjrM= -b612.me/staros v1.1.4/go.mod h1://P/Ivz7hb/lrI+FwMh5G/T27iJ8WlWZZr3wOoPfVsU= +b612.me/starmap v1.2.2 h1:1OQbd0XXU7G/cHvkj9lEZg8sLZWZEcYlRjYzDxRc4N0= +b612.me/starmap v1.2.2/go.mod h1:fXb1SF8+BrkHlhSMQAJ/DUTYpqhNimPukpqzUIRio4U= +b612.me/starnet v0.1.6 h1:/QaaKpuXfvJm6ayvk85jaLaKBmO1zx+XSxfnlSB3xGw= +b612.me/starnet v0.1.6/go.mod h1:JjFLTMPsWsPei7AiXwBTt4QCoB9gux1XS7SHv/Ux+D4= +b612.me/staros v1.1.5 h1:0Mkk0TOYoI9SOUf50X2Amb+/4p2lopMntOzV5nPKEeg= +b612.me/staros v1.1.5/go.mod h1:JcmVUeFbuITVnwPqxCr6R9yDbBmFrfyhdk2HVdZMXYw= b612.me/win32api v0.0.1 h1:vLFB1xhO6pd9+zB2EyaapKB459Urv3v+C1YwgwOFEWo= b612.me/win32api v0.0.1/go.mod h1:MHu0JBQjzxQ2yxpZPUBbn5un45o67eF5iWKa4Q9e0yE= -b612.me/wincmd v0.0.1 h1:4+RCFKHuD/JqAYsdtO6sTNKJs1nQVMQo87h6KhTJjkM= -b612.me/wincmd v0.0.1/go.mod h1:32xTM7qWAI7jx6qwTrig05rxejSYbSp7CX5WD7qsMxY= +b612.me/wincmd v0.0.2 h1:Ub1WtelVT6a3vD4B6zDYo3UPO/t9ymnI3x1dQPJcrGw= +b612.me/wincmd v0.0.2/go.mod h1:bwpyCKfSDY8scSMo3Lrd0Qnqvpz7/CILL7oodfG0wgo= golang.org/x/crypto v0.0.0-20220313003712-b769efc7c000/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38= -golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064 h1:S25/rfnfsMVgORT4/J61MJ7rdyseOZOyvLIrZEZ7s6s= +golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220318055525-2edf467146b5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= diff --git a/standed.go b/standed.go index c4e63e3..51eca8b 100644 --- a/standed.go +++ b/standed.go @@ -16,7 +16,6 @@ func init() { stacks = starmap.NewStarStack(1024) rand.Seed(time.Now().UnixNano()) stackStopChan = make(chan int) - StartStacks() Std = NewStarlog(nil) } diff --git a/starlog.go b/starlog.go index 6be41ae..745f207 100644 --- a/starlog.go +++ b/starlog.go @@ -29,6 +29,9 @@ func (logger *StarLogger) GetWriter() io.Writer { } func (logger *StarLogger) SetHandler(f func(LogData)) { + if f != nil { + StartStacks() + } logger.handlerFunc = f } func (logger *StarLogger) GetHandler() func(LogData) {