github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/mobile/bind/testdata/structs.go (about) 1 // Copyright 2014 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package structs 6 7 type S struct { 8 X, Y float64 9 unexported bool 10 } 11 12 func (s *S) Sum() float64 { 13 return s.X + s.Y 14 } 15 16 func (s *S) Identity() (*S, error) { 17 return s, nil 18 } 19 20 func Identity(s *S) *S { 21 return s 22 } 23 24 func IdentityWithError(s *S) (*S, error) { 25 return s, nil 26 }