Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for fieldDecl (0.18 sec)

  1. src/cmd/compile/internal/syntax/parser.go

    		panic("inconsistent struct field list")
    	}
    }
    
    // FieldDecl      = (IdentifierList Type | AnonymousField) [ Tag ] .
    // AnonymousField = [ "*" ] TypeName .
    // Tag            = string_lit .
    func (p *parser) fieldDecl(styp *StructType) {
    	if trace {
    		defer p.trace("fieldDecl")()
    	}
    
    	pos := p.pos()
    	switch p.tok {
    	case _Name:
    		name := p.name()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
  2. doc/go_spec.html

    Within a struct, non-<a href="#Blank_identifier">blank</a> field names must
    be <a href="#Uniqueness_of_identifiers">unique</a>.
    </p>
    
    <pre class="ebnf">
    StructType    = "struct" "{" { FieldDecl ";" } "}" .
    FieldDecl     = (IdentifierList Type | EmbeddedField) [ Tag ] .
    EmbeddedField = [ "*" ] TypeName [ TypeArgs ] .
    Tag           = string_lit .
    </pre>
    
    <pre>
    // An empty struct.
    struct {}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 21:07:21 UTC 2024
    - 281.5K bytes
    - Viewed (1)
  3. pkg/apis/core/validation/validation_test.go

    	testCases := []struct {
    		name           string
    		expectError    bool
    		featureEnabled bool
    		fieldSel       *core.ObjectFieldSelector
    	}{
    		{
    			name:           "has no hostIPs field, featuregate enabled",
    			expectError:    false,
    			featureEnabled: true,
    			fieldSel:       &core.ObjectFieldSelector{FieldPath: "status.hostIP"},
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 857.7K bytes
    - Viewed (0)
  4. pkg/apis/core/validation/validation.go

    		return allErrs
    	}
    
    	return allErrs
    }
    
    func validateDownwardAPIHostIPs(fieldSel *core.ObjectFieldSelector, fldPath *field.Path, opts PodValidationOptions) field.ErrorList {
    	allErrs := field.ErrorList{}
    	if !opts.AllowHostIPsField {
    		if fieldSel.FieldPath == "status.hostIPs" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 349.5K bytes
    - Viewed (0)
Back to top