Source File
tuple.go
Belonging Package
go/types
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.// Source: ../../cmd/compile/internal/types2/tuple.go// Copyright 2011 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.package types// A Tuple represents an ordered list of variables; a nil *Tuple is a valid (empty) tuple.// Tuples are used as components of signatures and to represent the type of multiple// assignments; they are not first class types of Go.type Tuple struct {vars []*Var}// NewTuple returns a new tuple for the given variables.func ( ...*Var) *Tuple {if len() > 0 {return &Tuple{vars: }}return nil}// Len returns the number variables of tuple t.func ( *Tuple) () int {if != nil {return len(.vars)}return 0}// At returns the i'th variable of tuple t.func ( *Tuple) ( int) *Var { return .vars[] }func ( *Tuple) () Type { return }func ( *Tuple) () string { return TypeString(, nil) }
![]() |
The pages are generated with Golds v0.7.9-preview. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |