github.com/go-asm/go@v1.21.1-0.20240213172139-40c5ead50c48/cmd/covdata/testdata/prog2.go (about)

     1  // Copyright 2022 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 main
     6  
     7  import (
     8  	"os"
     9  	"prog/dep"
    10  )
    11  
    12  //go:noinline
    13  func fifth() {
    14  	println("hubba")
    15  }
    16  
    17  //go:noinline
    18  func sixth() {
    19  	println("wha?")
    20  }
    21  
    22  func main() {
    23  	println(dep.Dep1())
    24  	if len(os.Args) > 1 {
    25  		fifth()
    26  	} else {
    27  		sixth()
    28  	}
    29  }