From 440515f6e43a88c9ddd4bb380934fda521c35b0d Mon Sep 17 00:00:00 2001 From: zhangyimingdatiancai <2654488395@qq.com> Date: Sun, 21 Jul 2024 03:36:35 +0000 Subject: [PATCH 1/6] Update dependencies and copyright information --- genC.go | 2 +- genGo.go | 2 +- genJava.go | 2 +- genRust.go | 2 +- genTypeScript.go | 2 +- go.mod | 2 +- go.sum | 43 ++++++++++++++++++++++++++++++++++++++++--- parser.go | 2 +- parser_test.go | 15 +++++++++------ proto.go | 8 ++++---- schema.go | 2 +- stack.go | 2 +- xmlAttribute.go | 2 +- xmlAttributeGroup.go | 2 +- xmlCharData.go | 2 +- xmlComplexType.go | 2 +- xmlElement.go | 2 +- xmlEnumeration.go | 2 +- xmlFractionDigits.go | 2 +- xmlGroup.go | 2 +- xmlImport.go | 2 +- xmlInclude.go | 2 +- xmlLength.go | 2 +- xmlList.go | 2 +- xmlMaxExclusive.go | 2 +- xmlMaxInclusive.go | 2 +- xmlMaxLength.go | 2 +- xmlMinExclusive.go | 2 +- xmlMinInclusive.go | 2 +- xmlMinLength.go | 2 +- xmlPattern.go | 2 +- xmlRestriction.go | 2 +- xmlSchema.go | 2 +- xmlSimpleType.go | 2 +- xmlTotalDigits.go | 2 +- xmlUnion.go | 2 +- xmlWhiteSpace.go | 2 +- 37 files changed, 87 insertions(+), 47 deletions(-) diff --git a/genC.go b/genC.go index 4d963b5..09e2a88 100644 --- a/genC.go +++ b/genC.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/genGo.go b/genGo.go index d62f00a..c27fa36 100644 --- a/genGo.go +++ b/genGo.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/genJava.go b/genJava.go index cefbdc2..70cbc87 100644 --- a/genJava.go +++ b/genJava.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/genRust.go b/genRust.go index 2bf8895..f3b9cb6 100644 --- a/genRust.go +++ b/genRust.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/genTypeScript.go b/genTypeScript.go index 31d7c0a..b5f9d38 100644 --- a/genTypeScript.go +++ b/genTypeScript.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/go.mod b/go.mod index add531b..dfd2bb5 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,6 @@ go 1.15 require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/stretchr/testify v1.7.1 - golang.org/x/net v0.7.0 + golang.org/x/net v0.27.0 gopkg.in/yaml.v3 v3.0.0 // indirect ) diff --git a/go.sum b/go.sum index beeb0df..1526b75 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,7 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -9,31 +10,67 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/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-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= +golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/parser.go b/parser.go index 0c6ffb2..781c36a 100644 --- a/parser.go +++ b/parser.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/parser_test.go b/parser_test.go index 271a901..1fff0da 100644 --- a/parser_test.go +++ b/parser_test.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // @@ -10,13 +10,14 @@ package xgen import ( "fmt" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" "io/ioutil" "os" "path/filepath" "strings" "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) var ( @@ -38,9 +39,11 @@ func TestParseGoExternal(t *testing.T) { // testParseForSource runs parsing tests for a given language. The sourceDirectory specifies the root of the // input for the tests. The expected structure of the sourceDirectory is as follows: -// source -// ├── xsd (with the input xsd files to run through the parser) -// └── (with the expected generated code named . +// +// source +// ├── xsd (with the input xsd files to run through the parser) +// └── (with the expected generated code named . +// // The test cleans up files it generates unless leaveOutput is set to true. In which case, the generate file is left // on disk for manual inspection under //output. func testParseForSource(t *testing.T, lang string, fileExt string, langDirName string, sourceDirectory string, leaveOutput bool) { diff --git a/proto.go b/proto.go index fa3c0ef..5af61e7 100644 --- a/proto.go +++ b/proto.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // @@ -102,9 +102,9 @@ type Group struct { // define if the elements it contains should be plural or not (as defined by the maxOccurs). // https://www.w3.org/TR/xmlschema-1/#Complex_Type_Definition_details type Choice struct { - ID string - Choice []Choice - Plural bool + ID string + Choice []Choice + Plural bool } // AttributeGroup definitions do not participate in ·validation· as such, but diff --git a/schema.go b/schema.go index d9f4681..de72f46 100644 --- a/schema.go +++ b/schema.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/stack.go b/stack.go index 82c067f..d6ac6d0 100644 --- a/stack.go +++ b/stack.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlAttribute.go b/xmlAttribute.go index e54b5e2..74adf1a 100644 --- a/xmlAttribute.go +++ b/xmlAttribute.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlAttributeGroup.go b/xmlAttributeGroup.go index b64d077..1e1cc57 100644 --- a/xmlAttributeGroup.go +++ b/xmlAttributeGroup.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlCharData.go b/xmlCharData.go index 7075733..f934af5 100644 --- a/xmlCharData.go +++ b/xmlCharData.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlComplexType.go b/xmlComplexType.go index 082a6cd..ff477e0 100644 --- a/xmlComplexType.go +++ b/xmlComplexType.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlElement.go b/xmlElement.go index 6157332..ffc3c84 100644 --- a/xmlElement.go +++ b/xmlElement.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlEnumeration.go b/xmlEnumeration.go index 09ba3d6..5bebc70 100644 --- a/xmlEnumeration.go +++ b/xmlEnumeration.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlFractionDigits.go b/xmlFractionDigits.go index 6771f5e..bbc87e9 100644 --- a/xmlFractionDigits.go +++ b/xmlFractionDigits.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlGroup.go b/xmlGroup.go index 0ea5c1a..2a463e6 100644 --- a/xmlGroup.go +++ b/xmlGroup.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlImport.go b/xmlImport.go index f5042e6..6fba2c6 100644 --- a/xmlImport.go +++ b/xmlImport.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlInclude.go b/xmlInclude.go index f57c1c1..6be1659 100644 --- a/xmlInclude.go +++ b/xmlInclude.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlLength.go b/xmlLength.go index 57dd438..d091fc3 100644 --- a/xmlLength.go +++ b/xmlLength.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlList.go b/xmlList.go index 73d1036..0d07154 100644 --- a/xmlList.go +++ b/xmlList.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlMaxExclusive.go b/xmlMaxExclusive.go index d2f7a08..d8c4d78 100644 --- a/xmlMaxExclusive.go +++ b/xmlMaxExclusive.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlMaxInclusive.go b/xmlMaxInclusive.go index 9a588b0..d50fac9 100644 --- a/xmlMaxInclusive.go +++ b/xmlMaxInclusive.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlMaxLength.go b/xmlMaxLength.go index c92c0e3..c0ee22e 100644 --- a/xmlMaxLength.go +++ b/xmlMaxLength.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlMinExclusive.go b/xmlMinExclusive.go index ab3464e..1f46897 100644 --- a/xmlMinExclusive.go +++ b/xmlMinExclusive.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlMinInclusive.go b/xmlMinInclusive.go index 6a51c76..a9bd4f0 100644 --- a/xmlMinInclusive.go +++ b/xmlMinInclusive.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlMinLength.go b/xmlMinLength.go index a1c2d17..b60ea67 100644 --- a/xmlMinLength.go +++ b/xmlMinLength.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlPattern.go b/xmlPattern.go index 3b14a3f..53d63ce 100644 --- a/xmlPattern.go +++ b/xmlPattern.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlRestriction.go b/xmlRestriction.go index 1247eea..8f2880c 100644 --- a/xmlRestriction.go +++ b/xmlRestriction.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlSchema.go b/xmlSchema.go index e8b19fa..79de1fe 100644 --- a/xmlSchema.go +++ b/xmlSchema.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlSimpleType.go b/xmlSimpleType.go index 9d7a1ff..45f9e25 100644 --- a/xmlSimpleType.go +++ b/xmlSimpleType.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlTotalDigits.go b/xmlTotalDigits.go index 753d5d4..ae4e7de 100644 --- a/xmlTotalDigits.go +++ b/xmlTotalDigits.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlUnion.go b/xmlUnion.go index 2545021..dce084f 100644 --- a/xmlUnion.go +++ b/xmlUnion.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // diff --git a/xmlWhiteSpace.go b/xmlWhiteSpace.go index 1a3b3d9..4ec2b78 100644 --- a/xmlWhiteSpace.go +++ b/xmlWhiteSpace.go @@ -1,4 +1,4 @@ -// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this +// Copyright 2020 - 2024 The xgen Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. // From ef8d42a5e453c822c51ad722b4ce715c61cdf148 Mon Sep 17 00:00:00 2001 From: zhangyimingdatiancai <2654488395@qq.com> Date: Sun, 21 Jul 2024 03:45:32 +0000 Subject: [PATCH 2/6] Go 1.18 required --- .github/workflows/go.yml | 2 +- README.md | 12 ++---------- README_zh.md | 14 +++----------- 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 36308a7..93a47a5 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -5,7 +5,7 @@ jobs: test: strategy: matrix: - go-version: [1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x] + go-version: [1.18.x, 1.19.x, 1.20.x, '>=1.21.1', 1.22.x] platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} steps: diff --git a/README.md b/README.md index f04fbbb..2183393 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Build Status Code Coverage Go Report Card - go.dev + go.dev Licenses Donate

@@ -15,24 +15,16 @@ ## Introduction -xgen is a library written in pure Go providing a set of functions that allow you to parse XSD (XML schema definition) files. This library needs Go version 1.10 or later. The full API docs can be seen using go's built-in documentation tool, or online at [go.dev](https://pkg.go.dev/github.com/xuri/xgen?tab=doc). +xgen is a library written in pure Go providing a set of functions that allow you to parse XSD (XML schema definition) files. This library needs Go version 1.18 or later. The full API docs can be seen using go's built-in documentation tool, or online at [go.dev](https://pkg.go.dev/github.com/xuri/xgen). `xgen` commands automatically compiles XML schema files into the multi-language type or class declarations code. Install the command line tool first. -If you're using Go 1.17 and later, installing executables with `go install` - ```sh go install github.com/xuri/xgen/cmd/xgen@latest ``` -If you're using Go 1.16 and earlier, installing executables with `go get` - -```sh -go get -u -v github.com/xuri/xgen/cmd/... -``` - The command below will walk on the `xsd` path and generate Go language struct code under the `output` directory. ```text diff --git a/README_zh.md b/README_zh.md index d828f70..0a8ca73 100644 --- a/README_zh.md +++ b/README_zh.md @@ -6,7 +6,7 @@ Build Status Code Coverage Go Report Card - go.dev + go.dev Licenses Donate

@@ -15,22 +15,14 @@ ## Introduction -xgen 是 Go 语言编写的 XSD (XML Schema Definition) 工具基础库。使用本基础库要求使用的 Go 语言为 1.10 或更高版本,完整的 API 使用文档请访问 [go.dev](https://pkg.go.dev/github.com/xuri/xgen?tab=doc)。 +xgen 是 Go 语言编写的 XSD (XML Schema Definition) 工具基础库。使用本基础库要求使用的 Go 语言为 1.18 或更高版本,完整的 API 使用文档请访问 [go.dev](https://pkg.go.dev/github.com/xuri/xgen)。 `xgen` 命令可将 XML 模式定义文件编译为多语言类型或类声明的代码。 首先安装命令行工具: -如果您使用的是 Go 1.17 及更高版本,请使用 `go install` 安装可执行文件 - -```sh -去安装 github.com/xuri/xgen/cmd/xgen@latest -``` - -如果您使用的是 Go 1.16 及更早版本,请使用 `go get` 安装可执行文件 - ```sh -去获取-u -v github.com/xuri/xgen/cmd/... +go install github.com/xuri/xgen/cmd/xgen@latest ``` 下面的命令将遍历 `xsd` 目录中的 XML 模式定义文件,并在 `output` 目录中生成 Go 语言结构体声明代码。 From f1aebbe8720f2f2310b1672868614543af523495 Mon Sep 17 00:00:00 2001 From: zhangyimingdatiancai <2654488395@qq.com> Date: Mon, 22 Jul 2024 12:33:48 +0000 Subject: [PATCH 3/6] Fix code review issues --- .github/workflows/codeql-analysis.yml | 8 ++--- README.md | 10 ++++++- README_zh.md | 10 ++++++- go.mod | 2 +- go.sum | 43 ++------------------------- 5 files changed, 26 insertions(+), 47 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 12eee8a..8d8bf67 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -20,15 +20,15 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/README.md b/README.md index 2183393..90543a3 100644 --- a/README.md +++ b/README.md @@ -15,16 +15,24 @@ ## Introduction -xgen is a library written in pure Go providing a set of functions that allow you to parse XSD (XML schema definition) files. This library needs Go version 1.18 or later. The full API docs can be seen using go's built-in documentation tool, or online at [go.dev](https://pkg.go.dev/github.com/xuri/xgen). +xgen is a library written in pure Go providing a set of functions that allow you to parse XSD (XML schema definition) files. This library needs Go version 1.10 or later. The full API docs can be seen using go's built-in documentation tool, or online at [go.dev](https://pkg.go.dev/github.com/xuri/xgen). `xgen` commands automatically compiles XML schema files into the multi-language type or class declarations code. Install the command line tool first. +If you're using Go 1.17 and later, installing executables with `go install` + ```sh go install github.com/xuri/xgen/cmd/xgen@latest ``` +If you're using Go 1.16 and earlier, installing executables with `go get` + +```sh +go get -u -v github.com/xuri/xgen/cmd/... +``` + The command below will walk on the `xsd` path and generate Go language struct code under the `output` directory. ```text diff --git a/README_zh.md b/README_zh.md index 0a8ca73..a60a6bd 100644 --- a/README_zh.md +++ b/README_zh.md @@ -15,16 +15,24 @@ ## Introduction -xgen 是 Go 语言编写的 XSD (XML Schema Definition) 工具基础库。使用本基础库要求使用的 Go 语言为 1.18 或更高版本,完整的 API 使用文档请访问 [go.dev](https://pkg.go.dev/github.com/xuri/xgen)。 +xgen 是 Go 语言编写的 XSD (XML Schema Definition) 工具基础库。使用本基础库要求使用的 Go 语言为 1.10 或更高版本,完整的 API 使用文档请访问 [go.dev](https://pkg.go.dev/github.com/xuri/xgen)。 `xgen` 命令可将 XML 模式定义文件编译为多语言类型或类声明的代码。 首先安装命令行工具: +如果您使用的是 Go 1.17 及更高版本,请使用 `go install` 安装可执行文件 + ```sh go install github.com/xuri/xgen/cmd/xgen@latest ``` +如果您使用的是 Go 1.16 及更早版本,请使用 `go get` 安装可执行文件 + +```sh +go install -u -v github.com/xuri/xgen/cmd/... +``` + 下面的命令将遍历 `xsd` 目录中的 XML 模式定义文件,并在 `output` 目录中生成 Go 语言结构体声明代码。 ```text diff --git a/go.mod b/go.mod index dfd2bb5..add531b 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,6 @@ go 1.15 require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/stretchr/testify v1.7.1 - golang.org/x/net v0.27.0 + golang.org/x/net v0.7.0 gopkg.in/yaml.v3 v3.0.0 // indirect ) diff --git a/go.sum b/go.sum index 1526b75..beeb0df 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,6 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -10,67 +9,31 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/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-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= -golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= -golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= -golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 82bd70928fb12f19c7ac493dcf5c85cfb1ff2227 Mon Sep 17 00:00:00 2001 From: zhangyimingdatiancai <2654488395@qq.com> Date: Mon, 22 Jul 2024 12:35:35 +0000 Subject: [PATCH 4/6] Rollback gi version in GitHub action --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 93a47a5..36308a7 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -5,7 +5,7 @@ jobs: test: strategy: matrix: - go-version: [1.18.x, 1.19.x, 1.20.x, '>=1.21.1', 1.22.x] + go-version: [1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x] platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} steps: From 6dced711f459b356738e9f45323c8c0f386fbd89 Mon Sep 17 00:00:00 2001 From: zhangyimingdatiancai <2654488395@qq.com> Date: Mon, 22 Jul 2024 12:36:48 +0000 Subject: [PATCH 5/6] Fix incorrect README install command --- README_zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_zh.md b/README_zh.md index a60a6bd..d1c232d 100644 --- a/README_zh.md +++ b/README_zh.md @@ -30,7 +30,7 @@ go install github.com/xuri/xgen/cmd/xgen@latest 如果您使用的是 Go 1.16 及更早版本,请使用 `go get` 安装可执行文件 ```sh -go install -u -v github.com/xuri/xgen/cmd/... +go get -u -v github.com/xuri/xgen/cmd/... ``` 下面的命令将遍历 `xsd` 目录中的 XML 模式定义文件,并在 `output` 目录中生成 Go 语言结构体声明代码。 From eea6e75b510c1aafe5ddb87b793db99797ff2883 Mon Sep 17 00:00:00 2001 From: zhangyimingdatiancai <2654488395@qq.com> Date: Mon, 22 Jul 2024 12:39:12 +0000 Subject: [PATCH 6/6] Update licenses file --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 38e031d..406c22b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2020 - 2021, xuri +Copyright (c) 2020 - 2024, xuri All rights reserved. Redistribution and use in source and binary forms, with or without