honnef.co/go/tools@v0.5.0-0.dev.0.20240520180541-dcae280a5e87/quickfix/qf1001/testdata/src/example.com/CheckDeMorgan/CheckDeMorgan.go.golden (about)

     1  -- Apply De Morgan's law --
     2  package pkg
     3  
     4  func fn() {
     5  	var a, b, c bool
     6  	var e, f, g int
     7  	var h, i float64
     8  
     9  	_ = !a || !b || !(!c || e > f) || g != f //@ diag(`could apply De Morgan's law`)
    10  	_ = !(a && h > i)
    11  }
    12  
    13  -- Apply De Morgan's law recursively --
    14  package pkg
    15  
    16  func fn() {
    17  	var a, b, c bool
    18  	var e, f, g int
    19  	var h, i float64
    20  
    21  	_ = !a || !b || (c && e <= f) || g != f //@ diag(`could apply De Morgan's law`)
    22  	_ = !(a && h > i)
    23  }
    24  
    25  -- Apply De Morgan's law recursively & simplify --
    26  package pkg
    27  
    28  func fn() {
    29  	var a, b, c bool
    30  	var e, f, g int
    31  	var h, i float64
    32  
    33  	_ = !a || !b || c && e <= f || g != f //@ diag(`could apply De Morgan's law`)
    34  	_ = !(a && h > i)
    35  }