- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 43 for valueSpec (0.13 sec)
-
src/internal/types/errors/generrordocs.go
} outDir := os.Args[1] if err := os.MkdirAll(outDir, 0755); err != nil { log.Fatal("unable to create output directory: %s", err) } walkCodes(func(name string, vs *ast.ValueSpec) { // ignore unused errors if name == "_" { return } // Ensure that < are represented correctly when its included in code // blocks. The goldmark Markdown parser converts them to &lt;
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 24 03:14:42 UTC 2023 - 3K bytes - Viewed (0) -
src/internal/types/errors/codes_test.go
. "go/types" ) func TestErrorCodeExamples(t *testing.T) { testenv.MustHaveGoBuild(t) // go command needed to resolve std .a files for importer.Default(). walkCodes(t, func(name string, value int, spec *ast.ValueSpec) { t.Run(name, func(t *testing.T) { doc := spec.Doc.Text() examples := strings.Split(doc, "Example:") for i := 1; i < len(examples); i++ { example := strings.TrimSpace(examples[i])
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 18 20:41:45 UTC 2022 - 4.9K bytes - Viewed (0) -
operator/pkg/translate/translate_common.go
func IsComponentEnabledFromValue(cn name.ComponentName, valueSpec map[string]any) (enabled bool, pathExist bool, err error) { t := NewTranslator() cnMap, ok := t.ComponentMaps[cn] if !ok { return false, false, nil } valuePath := cnMap.ToHelmValuesTreeRoot enabledPath := valuePath + ".enabled" enableNodeI, found, err := tpath.Find(valueSpec, util.ToYAMLPath(enabledPath)) if err != nil {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sun Apr 21 17:42:54 UTC 2024 - 4.5K bytes - Viewed (0) -
src/cmd/doc/pkg.go
typ := "" for i, spec := range n.Specs { valueSpec := spec.(*ast.ValueSpec) // Must succeed; we can't mix types in one GenDecl. // The type name may carry over from a previous specification in the // case of constants and iota. if valueSpec.Type != nil { typ = fmt.Sprintf(" %s", pkg.oneLineNodeDepth(valueSpec.Type, depth)) } else if len(valueSpec.Values) > 0 { typ = "" }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 08 20:15:52 UTC 2024 - 32K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go
if gd.Tok != token.VAR { return } for _, spec := range gd.Specs { valueSpec := spec.(*ast.ValueSpec) for i, x := range valueSpec.Values { if path := lockPathRhs(pass, x); path != nil { pass.ReportRangef(x, "variable declaration copies lock value to %v: %v", valueSpec.Names[i].Name, path) } } } } // checkCopyLocksCompositeLit detects lock copy inside a composite literal
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 9.9K bytes - Viewed (0) -
src/go/format/format_test.go
wantLit := file.Decls[0].(*ast.GenDecl).Specs[0].(*ast.ValueSpec).Values[0].(*ast.BasicLit) wantVal := wantLit.Value var buf bytes.Buffer if err = Node(&buf, fset, file); err != nil { t.Fatal("Node failed:", err) } diff(t, buf.Bytes(), []byte(golden)) // Check if anything changed after Node returned. gotLit := file.Decls[0].(*ast.GenDecl).Specs[0].(*ast.ValueSpec).Values[0].(*ast.BasicLit) gotVal := gotLit.Value
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Feb 20 03:54:46 UTC 2021 - 4.5K bytes - Viewed (0) -
operator/pkg/translate/translate_value.go
// tree, based on feature/component inheritance relationship. func (t *ReverseTranslator) setEnablementFromValue(valueSpec map[string]any, root map[string]any) error { for _, cni := range t.ValuesToComponentName { enabled, pathExist, err := IsComponentEnabledFromValue(cni, valueSpec) if err != nil { return err } if !pathExist { continue } tmpl := componentEnablementPattern
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Feb 08 03:52:24 UTC 2024 - 21.6K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/lostcancel/lostcancel.go
switch v := node.(type) { case *ast.FuncLit: funcScope = pass.TypesInfo.Scopes[v.Type] case *ast.FuncDecl: funcScope = pass.TypesInfo.Scopes[v.Type] } // Maps each cancel variable to its defining ValueSpec/AssignStmt. cancelvars := make(map[*types.Var]ast.Node) // TODO(adonovan): opt: refactor to make a single pass // over the AST using inspect.WithStack and node types // {FuncDecl,FuncLit,CallExpr,SelectorExpr}.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 22 19:00:13 UTC 2024 - 9K bytes - Viewed (0) -
src/go/doc/filter.go
if f(name.Name) { return true } } } } return false } func matchDecl(d *ast.GenDecl, f Filter) bool { for _, d := range d.Specs { switch v := d.(type) { case *ast.ValueSpec: for _, name := range v.Names { if f(name.Name) { return true } } case *ast.TypeSpec: if f(v.Name.Name) { return true }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 01 18:18:07 UTC 2022 - 2.2K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/testinggoroutine/util.go
switch d := id.Obj.Decl.(type) { case *ast.AssignStmt: for i, x := range d.Lhs { if ident, isIdent := x.(*ast.Ident); isIdent && ident.Name == id.Name && i < len(d.Rhs) { rhs = d.Rhs[i] } } case *ast.ValueSpec: for i, n := range d.Names { if n.Name == id.Name && i < len(d.Values) { rhs = d.Values[i] } } } lit, _ := rhs.(*ast.FuncLit) return lit
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 2.4K bytes - Viewed (0)