update
This commit is contained in:
@@ -37,7 +37,7 @@ func exists(filename string) bool {
|
||||
|
||||
func main() {
|
||||
defer func() {
|
||||
if e.Panicked() {
|
||||
if e.Panicked {
|
||||
_ = recover()
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -82,6 +82,9 @@ func main() {
|
||||
func() {
|
||||
var ok bool
|
||||
defer func() {
|
||||
if e.Panicked {
|
||||
fmt.Fprintln(os.Stderr, "----", filename, "----")
|
||||
}
|
||||
if !ok {
|
||||
_ = os.Remove(filename + ".xml")
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ func exists(filename string) bool {
|
||||
|
||||
func main() {
|
||||
defer func() {
|
||||
if e.Panicked() {
|
||||
if e.Panicked {
|
||||
_ = recover()
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -80,6 +80,9 @@ func main() {
|
||||
func() {
|
||||
var ok bool
|
||||
defer func() {
|
||||
if e.Panicked {
|
||||
fmt.Fprintln(os.Stderr, "----", filename, "----")
|
||||
}
|
||||
if !ok {
|
||||
_ = os.Remove(filename + ".xml")
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ func fileDate(filename string) string {
|
||||
|
||||
func main() {
|
||||
defer func() {
|
||||
if e.Panicked() {
|
||||
if e.Panicked {
|
||||
_ = recover()
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -100,6 +100,9 @@ func main() {
|
||||
func() {
|
||||
var ok bool
|
||||
defer func() {
|
||||
if e.Panicked {
|
||||
fmt.Fprintln(os.Stderr, "----", filename, "----")
|
||||
}
|
||||
if !ok {
|
||||
_ = os.Remove(filename + ".xml")
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func fileDate(filename string) string {
|
||||
|
||||
func main() {
|
||||
defer func() {
|
||||
if e.Panicked() {
|
||||
if e.Panicked {
|
||||
_ = recover()
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -99,6 +99,9 @@ func main() {
|
||||
func() {
|
||||
var ok bool
|
||||
defer func() {
|
||||
if e.Panicked {
|
||||
fmt.Fprintln(os.Stderr, "----", filename, "----")
|
||||
}
|
||||
if !ok {
|
||||
_ = os.Remove(filename + ".xml")
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ func fileDate(filename string) string {
|
||||
|
||||
func main() {
|
||||
defer func() {
|
||||
if e.Panicked() {
|
||||
if e.Panicked {
|
||||
_ = recover()
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -104,6 +104,9 @@ func main() {
|
||||
func() {
|
||||
var ok bool
|
||||
defer func() {
|
||||
if e.Panicked {
|
||||
fmt.Fprintln(os.Stderr, "----", filename, "----")
|
||||
}
|
||||
if !ok {
|
||||
_ = os.Remove(filename + ".xml")
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ func fileDate(filename string) string {
|
||||
|
||||
func main() {
|
||||
defer func() {
|
||||
if e.Panicked() {
|
||||
if e.Panicked {
|
||||
_ = recover()
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -99,6 +99,9 @@ func main() {
|
||||
func() {
|
||||
var ok bool
|
||||
defer func() {
|
||||
if e.Panicked {
|
||||
fmt.Fprintln(os.Stderr, "----", filename, "----")
|
||||
}
|
||||
if !ok {
|
||||
_ = os.Remove(filename + ".xml")
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ func exists(filename string) bool {
|
||||
|
||||
func main() {
|
||||
defer func() {
|
||||
if e.Panicked() {
|
||||
if e.Panicked {
|
||||
_ = recover()
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -82,6 +82,9 @@ func main() {
|
||||
func() {
|
||||
var ok bool
|
||||
defer func() {
|
||||
if e.Panicked {
|
||||
fmt.Fprintln(os.Stderr, "----", filename, "----")
|
||||
}
|
||||
if !ok {
|
||||
_ = os.Remove(filename + ".xml")
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ func exists(filename string) bool {
|
||||
|
||||
func main() {
|
||||
defer func() {
|
||||
if e.Panicked() {
|
||||
if e.Panicked {
|
||||
_ = recover()
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -82,6 +82,9 @@ func main() {
|
||||
func() {
|
||||
var ok bool
|
||||
defer func() {
|
||||
if e.Panicked {
|
||||
fmt.Fprintln(os.Stderr, "----", filename, "----")
|
||||
}
|
||||
if !ok {
|
||||
_ = os.Remove(filename + ".xml")
|
||||
}
|
||||
@@ -91,7 +94,7 @@ func main() {
|
||||
p(fp.WriteString("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<item>\n"))
|
||||
p(fmt.Fprintf(fp, "<unixTime>%d</unixTime>", t.Unix()))
|
||||
p(fp.Write(item.Data))
|
||||
p(fp.WriteString("</)item>\n"))
|
||||
p(fp.WriteString("</item>\n"))
|
||||
p(fp.Close())
|
||||
p(os.Chtimes(filename+".xml", t, t))
|
||||
ok = true
|
||||
|
||||
@@ -55,7 +55,7 @@ func fileDate(filename string) string {
|
||||
|
||||
func main() {
|
||||
defer func() {
|
||||
if e.Panicked() {
|
||||
if e.Panicked {
|
||||
_ = recover()
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -94,6 +94,9 @@ func main() {
|
||||
func() {
|
||||
var ok bool
|
||||
defer func() {
|
||||
if e.Panicked {
|
||||
fmt.Fprintln(os.Stderr, "----", filename, "----")
|
||||
}
|
||||
if !ok {
|
||||
_ = os.Remove(filename + ".xml")
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ func exists(filename string) bool {
|
||||
|
||||
func main() {
|
||||
defer func() {
|
||||
if e.Panicked() {
|
||||
if e.Panicked {
|
||||
_ = recover()
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -82,6 +82,9 @@ func main() {
|
||||
func() {
|
||||
var ok bool
|
||||
defer func() {
|
||||
if e.Panicked {
|
||||
fmt.Fprintln(os.Stderr, "----", filename, "----")
|
||||
}
|
||||
if !ok {
|
||||
_ = os.Remove(filename + ".xml")
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ func fileDate(filename string) string {
|
||||
|
||||
func main() {
|
||||
defer func() {
|
||||
if e.Panicked() {
|
||||
if e.Panicked {
|
||||
_ = recover()
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -116,6 +116,9 @@ func main() {
|
||||
func() {
|
||||
var ok bool
|
||||
defer func() {
|
||||
if e.Panicked {
|
||||
fmt.Fprintln(os.Stderr, "----", filename, "----")
|
||||
}
|
||||
if !ok {
|
||||
_ = os.Remove(filename + ".xml")
|
||||
}
|
||||
|
||||
2
go.mod
2
go.mod
@@ -4,4 +4,4 @@ go 1.26.1
|
||||
|
||||
require github.com/jbowtie/gokogiri v0.0.0-20250107075044-de0f9d4877a5
|
||||
|
||||
require codeberg.org/pebbe/errors v0.3.0
|
||||
require codeberg.org/pebbe/errors v0.4.0
|
||||
|
||||
4
go.sum
4
go.sum
@@ -1,4 +1,4 @@
|
||||
codeberg.org/pebbe/errors v0.3.0 h1:031dKFUvGzXxsb+ig7cKNpohHeQ38ghXDZrd7KehdbU=
|
||||
codeberg.org/pebbe/errors v0.3.0/go.mod h1:O7PPxUJM1bWRHq11CRK3wqVaH/3NnRaSVZvh3UhzDCY=
|
||||
codeberg.org/pebbe/errors v0.4.0 h1:G05wsXpC/LRPaL02QYDwtz0sWFWQcIWK1s+MC79LBzU=
|
||||
codeberg.org/pebbe/errors v0.4.0/go.mod h1:O7PPxUJM1bWRHq11CRK3wqVaH/3NnRaSVZvh3UhzDCY=
|
||||
github.com/jbowtie/gokogiri v0.0.0-20250107075044-de0f9d4877a5 h1:tQbR4RKFBFi0+Ll69dXejKKUbQVNaOAT2fjlDvSAfx4=
|
||||
github.com/jbowtie/gokogiri v0.0.0-20250107075044-de0f9d4877a5/go.mod h1:kQE2lxPgVKe0JsBZMFFfMm5zBDCuRhaHFKOBzZeCLiw=
|
||||
|
||||
Reference in New Issue
Block a user