feat: kubesphere 4.0 (#6115)

* feat: kubesphere 4.0

Signed-off-by: ci-bot <ci-bot@kubesphere.io>

* feat: kubesphere 4.0

Signed-off-by: ci-bot <ci-bot@kubesphere.io>

---------

Signed-off-by: ci-bot <ci-bot@kubesphere.io>
Co-authored-by: ks-ci-bot <ks-ci-bot@example.com>
Co-authored-by: joyceliu <joyceliu@yunify.com>
This commit is contained in:
KubeSphere CI Bot
2024-09-06 11:05:52 +08:00
committed by GitHub
parent b5015ec7b9
commit 447a51f08b
8557 changed files with 546695 additions and 1146174 deletions

View File

@@ -66,7 +66,7 @@ func FromKeywords(constructor starlark.Value, kwargs []starlark.Tuple) *Struct {
return s
}
// FromStringDict returns a whose elements are those of d.
// FromStringDict returns a new struct instance whose elements are those of d.
// The constructor parameter specifies the constructor; use Default for an ordinary struct.
func FromStringDict(constructor starlark.Value, d starlark.StringDict) *Struct {
if constructor == nil {
@@ -132,11 +132,12 @@ func (s *Struct) ToStringDict(d starlark.StringDict) {
func (s *Struct) String() string {
buf := new(strings.Builder)
if s.constructor == Default {
switch constructor := s.constructor.(type) {
case starlark.String:
// NB: The Java implementation always prints struct
// even for Bazel provider instances.
buf.WriteString("struct") // avoid String()'s quotation
} else {
buf.WriteString(constructor.GoString()) // avoid String()'s quotation
default:
buf.WriteString(s.constructor.String())
}
buf.WriteByte('(')