Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 185 for parseDir (0.16 sec)

  1. src/go/parser/parser_test.go

    	}
    }
    
    func TestParseDir(t *testing.T) {
    	path := "."
    	pkgs, err := ParseDir(token.NewFileSet(), path, dirFilter, 0)
    	if err != nil {
    		t.Fatalf("ParseDir(%s): %v", path, err)
    	}
    	if n := len(pkgs); n != 1 {
    		t.Errorf("got %d packages; want 1", n)
    	}
    	pkg := pkgs["parser"]
    	if pkg == nil {
    		t.Errorf(`package "parser" not found`)
    		return
    	}
    	if n := len(pkg.Files); n != 3 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 31 20:26:14 UTC 2024
    - 24.6K bytes
    - Viewed (0)
  2. src/cmd/doc/pkg.go

    			}
    		}
    		for _, name := range pkg.CgoFiles {
    			if name == info.Name() {
    				return true
    			}
    		}
    		return false
    	}
    	fset := token.NewFileSet()
    	pkgs, err := parser.ParseDir(fset, pkg.Dir, include, parser.ParseComments)
    	if err != nil {
    		log.Fatal(err)
    	}
    	// Make sure they are all in one package.
    	if len(pkgs) == 0 {
    		log.Fatalf("no source-code package in directory %s", pkg.Dir)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 08 20:15:52 UTC 2024
    - 32K bytes
    - Viewed (0)
  3. src/crypto/x509/parser.go

    			}
    			rdnSet = append(rdnSet, attr)
    		}
    
    		rdnSeq = append(rdnSeq, rdnSet)
    	}
    
    	return &rdnSeq, nil
    }
    
    func parseAI(der cryptobyte.String) (pkix.AlgorithmIdentifier, error) {
    	ai := pkix.AlgorithmIdentifier{}
    	if !der.ReadASN1ObjectIdentifier(&ai.Algorithm) {
    		return ai, errors.New("x509: malformed OID")
    	}
    	if der.Empty() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:00:16 UTC 2024
    - 38.5K bytes
    - Viewed (0)
  4. src/go/internal/gccgoimporter/parser.go

    }
    
    func (p *parser) error(err any) {
    	if s, ok := err.(string); ok {
    		err = errors.New(s)
    	}
    	// panic with a runtime.Error if err is not an error
    	panic(importError{p.scanner.Pos(), err.(error)})
    }
    
    func (p *parser) errorf(format string, args ...any) {
    	p.error(fmt.Errorf(format, args...))
    }
    
    func (p *parser) expect(tok rune) string {
    	lit := p.lit
    	if p.tok != tok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 02 23:14:07 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  5. src/net/ip_test.go

    	{"abcd:2345::/63", ParseIP("abcd:2345::"), &IPNet{IP: ParseIP("abcd:2345::"), Mask: IPMask(ParseIP("ffff:ffff:ffff:fffe::"))}, nil},
    	{"abcd:2345::/33", ParseIP("abcd:2345::"), &IPNet{IP: ParseIP("abcd:2345::"), Mask: IPMask(ParseIP("ffff:ffff:8000::"))}, nil},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 01:17:29 UTC 2024
    - 25.7K bytes
    - Viewed (0)
  6. src/net/ip.go

    }
    
    // ParseIP parses s as an IP address, returning the result.
    // The string s can be in IPv4 dotted decimal ("192.0.2.1"), IPv6
    // ("2001:db8::68"), or IPv4-mapped IPv6 ("::ffff:192.0.2.1") form.
    // If s is not a valid textual representation of an IP address,
    // ParseIP returns nil.
    func ParseIP(s string) IP {
    	if addr, valid := parseIP(s); valid {
    		return IP(addr[:])
    	}
    	return nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 18 03:13:26 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  7. internal/jwt/parser.go

    package jwt
    
    // This file is a re-implementation of the original code here with some
    // additional allocation tweaks reproduced using GODEBUG=allocfreetrace=1
    // original file https://github.com/golang-jwt/jwt/blob/main/parser.go
    // borrowed under MIT License https://github.com/golang-jwt/jwt/blob/main/LICENSE
    
    import (
    	"bytes"
    	"crypto"
    	"crypto/hmac"
    	"encoding/base64"
    	"errors"
    	"fmt"
    	"hash"
    	"sync"
    	"time"
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 09 07:53:08 UTC 2023
    - 13.9K bytes
    - Viewed (0)
  8. src/internal/trace/internal/oldtrace/parser.go

    	lastGs map[int32]uint64
    	lastP  int32
    }
    
    func (p *parser) discard(n uint64) bool {
    	if n > math.MaxInt {
    		return false
    	}
    	if noff := p.off + int(n); noff < p.off || noff > len(p.data) {
    		return false
    	} else {
    		p.off = noff
    	}
    	return true
    }
    
    func newParser(r io.Reader, ver version.Version) (*parser, error) {
    	var buf []byte
    	if seeker, ok := r.(io.Seeker); ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 21:15:28 UTC 2024
    - 46.8K bytes
    - Viewed (0)
  9. internal/s3select/sql/parser.go

    }
    
    // FuncExpr represents a function call
    type FuncExpr struct {
    	SFunc     *SimpleArgFunc `parser:"  @@"`
    	Count     *CountFunc     `parser:"| @@"`
    	Cast      *CastFunc      `parser:"| @@"`
    	Substring *SubstringFunc `parser:"| @@"`
    	Extract   *ExtractFunc   `parser:"| @@"`
    	Trim      *TrimFunc      `parser:"| @@"`
    	DateAdd   *DateAddFunc   `parser:"| @@"`
    	DateDiff  *DateDiffFunc  `parser:"| @@"`
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  10. src/go/build/read.go

    	// we are sure we don't change the errors that go/parser returns.
    	if r.err == errSyntax {
    		r.err = nil
    		for r.err == nil && !r.eof {
    			r.readByte()
    		}
    		info.header = r.buf
    	}
    	if r.err != nil {
    		return r.err
    	}
    
    	if info.fset == nil {
    		return nil
    	}
    
    	// Parse file header & record imports.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 14.1K bytes
    - Viewed (0)
Back to top