Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ZeroValue (0.1 sec)

  1. src/cmd/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go

    	if offset >= len(src) {
    		return end
    	}
    	if width := bytes.IndexAny(src[offset:], " \n,():;[]+-*"); width > 0 {
    		end = start + token.Pos(width)
    	}
    	return end
    }
    
    func ZeroValue(f *ast.File, pkg *types.Package, typ types.Type) ast.Expr {
    	// TODO(adonovan): think about generics, and also generic aliases.
    	under := aliases.Unalias(typ)
    	// Don't call Underlying unconditionally: although it removes
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  2. src/internal/fuzz/fuzz.go

    	c.warmupInputLeft = c.warmupInputCount
    
    	if len(c.corpus.entries) == 0 {
    		fmt.Fprintf(c.opts.Log, "warning: starting with empty corpus\n")
    		var vals []any
    		for _, t := range opts.Types {
    			vals = append(vals, zeroValue(t))
    		}
    		data := marshalCorpusFile(vals...)
    		h := sha256.Sum256(data)
    		name := fmt.Sprintf("%x", h[:4])
    		c.addCorpusEntries(false, CorpusEntry{Path: name, Data: data})
    	}
    
    	return c, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 34.1K bytes
    - Viewed (0)
Back to top