secondpkg.go 661 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright 2016 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. // Package secondpkg is imported by bind tests that verify
  5. // that a bound package can reference another bound package.
  6. package secondpkg
  7. type (
  8. Ser interface {
  9. S(_ *S)
  10. }
  11. IF interface {
  12. F()
  13. }
  14. I interface {
  15. F(i int) int
  16. }
  17. S struct{}
  18. )
  19. func (_ *S) F(i int) int {
  20. return i
  21. }
  22. const HelloString = "secondpkg string"
  23. func Hello() string {
  24. return HelloString
  25. }
  26. type Secondpkg struct {
  27. V string
  28. }
  29. func (_ *Secondpkg) M() {
  30. }
  31. func NewSecondpkg() *Secondpkg {
  32. return new(Secondpkg)
  33. }