Files
gomobile-tvos-fork/bind/testdata/structs.go
Dmitri ShuralyovandGopher Robot a8bae73673 all: make copyright headers consistent
The standard copyright header at https://go.dev/doc/contribute#copyright
has a single space (also see CL 20022). Also, add it to a files where it
was missed.

Change-Id: I341ce5b5c455efa768b65597c387866e47a6757e
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/649382
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2025-02-18 09:38:25 -08:00

47 lines
658 B
Go

// Copyright 2014 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 structs
type S struct {
X, Y float64
unexported bool
}
func (s *S) Sum() float64 {
return s.X + s.Y
}
func (s *S) Identity() (*S, error) {
return s, nil
}
func Identity(s *S) *S {
return s
}
func IdentityWithError(s *S) (*S, error) {
return s, nil
}
type (
S2 struct{}
I interface {
M()
}
)
func (s *S2) M() {
}
func (_ *S2) String() string {
return ""
}
// Structs is a struct with the same name as its package.
type Structs struct{}
func (_ *Structs) M() {
}