github.com/google/capslock@v0.2.3-0.20240517042941-dac19fc347c0/testpkgs/callnet/callnet.go (about)

     1  // Copyright 2023 Google LLC
     2  //
     3  // Use of this source code is governed by a BSD-style
     4  // license that can be found in the LICENSE file or at
     5  // https://developers.google.com/open-source/licenses/bsd
     6  
     7  // Package callnet is used for testing.
     8  package callnet
     9  
    10  import (
    11  	"net"
    12  )
    13  
    14  // Foo is a test function.
    15  func Foo() int {
    16  	ips, err := net.LookupIP("localhost")
    17  	if err != nil {
    18  		println(err)
    19  	}
    20  	return len(ips)
    21  }