• Rob Pike's avatar
    text/template: allow comparison functions to work between any integers · db56d4d5
    Rob Pike authored
    Previously, signed and unsigned integers could not be compared, but
    this has problems with things like comparing 'x' with a byte in a string.
    Since signed and unsigned integers have a well-defined ordering,
    even though their types are different, and since we already allow
    comparison regardless of the size of the integers, why not allow it
    regardless of the sign?
    
    Integers only, a fine place to draw the line.
    
    Fixes #7489.
    
    LGTM=adg
    R=golang-codereviews, adg
    CC=golang-codereviews
    https://golang.org/cl/149780043
    db56d4d5
funcs.go 14.5 KB