Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Azure/go-ansiterm Loading
base: d6e3b33
Choose a base ref
...
head repository: Azure/go-ansiterm Loading
compare: d185dfc
Choose a head ref
  • 9 commits
  • 5 files changed
  • 5 contributors

Commits on Jun 5, 2021

  1. Added compatibility with "golang.org/x/sys/windows"

    Many of the consumers of this library use "golang.org/x/sys/windows" since it's better maintained then syscall package.
    
    This has caused breaking changes with several clients this PR fixes these migration issues + maintain compatibility with the consumers of syscall package
    n4j committed Jun 5, 2021
    Configuration menu
    Copy the full SHA
    3ee0038 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2021

  1. Merge pull request #31 from n4j/syscallFix

    Added compatibility with "golang.org/x/sys/windows"
    jstarks committed Jun 8, 2021
    Configuration menu
    Copy the full SHA
    43c61cb View commit details
    Browse the repository at this point in the history
  2. winterm: fix GetStdFile() falltrough

    Commit 3ee0038 updated the switch
    with the intent to handle either syscall.XX or golang.org/x/sys/win.XX
    values.
    
    However, Go "switch" does not have an implicit "fallthrough" behavior,
    and either requires the "fallthrough" keyword to be used, or to combine
    values in a single "case".
    
    For example, the following:
    
        for _, v := range []int{1, 2, 3, 4, 5, 6, 7} {
            result := "unknown"
            switch v {
            case 1: // doesn't fall-through, so this is an empty "case"
            case 2:
                result = "found one or two"
            case 3:
                fallthrough // falls through to "case 4"
            case 4:
                result = "found three or four"
            case 5, 6: // matches either 5 or 6
                result = "found five or six"
            default:
                result = "found something else"
            }
            fmt.Printf("%d: %s\n", v, result)
        }
    
    Will print:
    
        1: unknown
        2: found one or two
        3: found three or four
        4: found three or four
        5: found five or six
        6: found five or six
        7: found something else
    
    This patch combines "equal" values in a single case within the switch to
    fix this issue.
    
    Signed-off-by: Sebastiaan van Stijn <[email protected]>
    thaJeztah committed Jun 8, 2021
    Configuration menu
    Copy the full SHA
    ca5fe9f View commit details
    Browse the repository at this point in the history
  3. Merge pull request #32 from thaJeztah/fix_switch

    winterm: fix GetStdFile() falltrough
    jstarks committed Jun 8, 2021
    Configuration menu
    Copy the full SHA
    2377c96 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2021

  1. Convert int to string using rune()

    See golang/go#32479
    
    Signed-off-by: Robert-André Mauchin <[email protected]>
    eclipseo authored and cpuguy83 committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    65725d2 View commit details
    Browse the repository at this point in the history
  2. add go.mod

    cpuguy83 committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    a041bb6 View commit details
    Browse the repository at this point in the history
  3. Add CI job

    cpuguy83 committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    7db606f View commit details
    Browse the repository at this point in the history
  4. Fix int overflow

    cpuguy83 committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    5a086cd View commit details
    Browse the repository at this point in the history
  5. Merge pull request #33 from cpuguy83/fix_int_overflow

    Fix int overflow
    jstarks committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    d185dfc View commit details
    Browse the repository at this point in the history
Loading