├── .gitignore ├── .dockerignore ├── Dockerfile ├── .goreleaser.yml ├── .github └── workflows │ └── goreleaser.yml ├── go.mod ├── LICENSE ├── README.md ├── go.sum ├── main.go └── CREDITS /.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | .dockerignore 3 | Dockerfile 4 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.24 AS builder 2 | 3 | WORKDIR /go/src/app 4 | COPY . . 5 | 6 | ENV CGO_ENABLED=0 GOOS=linux 7 | 8 | RUN go install -v ./... 9 | 10 | FROM scratch 11 | 12 | COPY --from=builder /go/bin/dlayer /bin/dlayer 13 | 14 | ENTRYPOINT ["/bin/dlayer"] 15 | -------------------------------------------------------------------------------- /.goreleaser.yml: -------------------------------------------------------------------------------- 1 | before: 2 | hooks: 3 | - go mod download 4 | builds: 5 | - env: 6 | - CGO_ENABLED=0 7 | goos: 8 | - linux 9 | - windows 10 | - darwin 11 | archives: 12 | - replacements: 13 | darwin: Darwin 14 | linux: Linux 15 | windows: Windows 16 | 386: i386 17 | amd64: x86_64 18 | files: 19 | - CREDITS 20 | - README.md 21 | - LICENSE 22 | checksum: 23 | name_template: 'checksums.txt' 24 | snapshot: 25 | name_template: "{{ .Tag }}-next" 26 | changelog: 27 | sort: asc 28 | filters: 29 | exclude: 30 | - '^docs:' 31 | - '^test:' 32 | -------------------------------------------------------------------------------- /.github/workflows/goreleaser.yml: -------------------------------------------------------------------------------- 1 | name: goreleaser 2 | 3 | on: 4 | push: 5 | tags: 6 | - '*' 7 | 8 | jobs: 9 | goreleaser: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - 13 | name: Checkout 14 | uses: actions/checkout@v2 15 | with: 16 | fetch-depth: 0 17 | - 18 | name: Set up Go 19 | uses: actions/setup-go@v2 20 | with: 21 | go-version: "1.24" 22 | - 23 | name: Run GoReleaser 24 | uses: goreleaser/goreleaser-action@v2 25 | with: 26 | version: latest 27 | args: release --rm-dist 28 | env: 29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 30 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/orisano/dlayer 2 | 3 | go 1.25.0 4 | 5 | require ( 6 | github.com/atotto/clipboard v0.1.4 7 | github.com/dustin/go-humanize v1.0.1 8 | github.com/gdamore/tcell/v2 v2.13.5 9 | github.com/pkg/profile v1.7.0 10 | github.com/rivo/tview v0.42.0 11 | mvdan.cc/sh/v3 v3.12.0 12 | ) 13 | 14 | require ( 15 | github.com/felixge/fgprof v0.9.5 // indirect 16 | github.com/gdamore/encoding v1.0.1 // indirect 17 | github.com/google/pprof v0.0.0-20251213031049-b05bdaca462f // indirect 18 | github.com/lucasb-eyer/go-colorful v1.3.0 // indirect 19 | github.com/rivo/uniseg v0.4.7 // indirect 20 | golang.org/x/sys v0.39.0 // indirect 21 | golang.org/x/term v0.38.0 // indirect 22 | golang.org/x/text v0.32.0 // indirect 23 | ) 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019-2023 Nao Yonashiro 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dlayer 2 | dlayer is docker layer analyzer. 3 | 4 | ## Installation 5 | ```bash 6 | go install github.com/orisano/dlayer@latest 7 | ``` 8 | or 9 | ``` 10 | docker pull orisano/dlayer 11 | ``` 12 | 13 | ## How to use 14 | ```bash 15 | $ dlayer -h 16 | Usage of dlayer: 17 | -a show details 18 | -d int 19 | max depth (default 8) 20 | -f string 21 | image.tar path (default "-") 22 | -i interactive mode 23 | -l int 24 | screen line width (default 100) 25 | -n int 26 | max files (default 100) 27 | ``` 28 | 29 | ```bash 30 | # recommended 31 | docker save image:tag | dlayer -i 32 | ``` 33 | or 34 | ```bash 35 | docker save image:tag | dlayer -n 100 | less 36 | ``` 37 | or 38 | ```bash 39 | docker save -o image.tar image:tag 40 | dlayer -f image.tar -n 1000 -d 10 | less 41 | ``` 42 | or 43 | ```bash 44 | # using docker 45 | docker save -o image.tar image:tag 46 | docker run -v $PWD:/workdir -it orisano/dlayer -i -f /workdir/image.tar 47 | ``` 48 | 49 | ![screenshot](https://github.com/orisano/dlayer/raw/images/images/screenshot.png) 50 | 51 | ## Related Projects 52 | * [orisano/bctx](https://github.com/orisano/bctx) - for build context analysis 53 | 54 | ## Author 55 | Nao Yonashiro (@orisano) 56 | 57 | ## License 58 | MIT 59 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= 2 | github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= 3 | github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs= 4 | github.com/chromedp/chromedp v0.9.2/go.mod h1:LkSXJKONWTCHAfQasKFUZI+mxqS4tZqhmtGzzhLsnLs= 5 | github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww= 6 | github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= 7 | github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= 8 | github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= 9 | github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= 10 | github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= 11 | github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= 12 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 13 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 14 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 15 | github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= 16 | github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= 17 | github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= 18 | github.com/felixge/fgprof v0.9.5 h1:8+vR6yu2vvSKn08urWyEuxx75NWPEvybbkBirEpsbVY= 19 | github.com/felixge/fgprof v0.9.5/go.mod h1:yKl+ERSa++RYOs32d8K6WEXCB4uXdLls4ZaZPpayhMM= 20 | github.com/gdamore/encoding v1.0.1 h1:YzKZckdBL6jVt2Gc+5p82qhrGiqMdG/eNs6Wy0u3Uhw= 21 | github.com/gdamore/encoding v1.0.1/go.mod h1:0Z0cMFinngz9kS1QfMjCP8TY7em3bZYeeklsSDPivEo= 22 | github.com/gdamore/tcell/v2 v2.13.5 h1:YvWYCSr6gr2Ovs84dXbZLjDuOfQchhj8buOEqY52rpA= 23 | github.com/gdamore/tcell/v2 v2.13.5/go.mod h1:+Wfe208WDdB7INEtCsNrAN6O2m+wsTPk1RAovjaILlo= 24 | github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= 25 | github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= 26 | github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= 27 | github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= 28 | github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY= 29 | github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= 30 | github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= 31 | github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= 32 | github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= 33 | github.com/google/pprof v0.0.0-20251213031049-b05bdaca462f h1:HU1RgM6NALf/KW9HEY6zry3ADbDKcmpQ+hJedoNGQYQ= 34 | github.com/google/pprof v0.0.0-20251213031049-b05bdaca462f/go.mod h1:67FPmZWbr+KDT/VlpWtw6sO9XSjpJmLuHpoLmWiTGgY= 35 | github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= 36 | github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= 37 | github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= 38 | github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= 39 | github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 40 | github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= 41 | github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 42 | github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs= 43 | github.com/lucasb-eyer/go-colorful v1.3.0 h1:2/yBRLdWBZKrf7gB40FoiKfAWYQ0lqNcbuQwVHXptag= 44 | github.com/lucasb-eyer/go-colorful v1.3.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= 45 | github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= 46 | github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0= 47 | github.com/pkg/profile v1.7.0 h1:hnbDkaNWPCLMO9wGLdBFTIZvzDrDfBM2072E1S9gJkA= 48 | github.com/pkg/profile v1.7.0/go.mod h1:8Uer0jas47ZQMJ7VD+OHknK4YDY07LPUC6dEvqDjvNo= 49 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 50 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 51 | github.com/rivo/tview v0.42.0 h1:b/ftp+RxtDsHSaynXTbJb+/n/BxDEi+W3UfF5jILK6c= 52 | github.com/rivo/tview v0.42.0/go.mod h1:cSfIYfhpSGCjp3r/ECJb+GKS7cGJnqV8vfjQPwoXyfY= 53 | github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= 54 | github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= 55 | github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= 56 | github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= 57 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 58 | github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= 59 | github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 60 | github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= 61 | github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= 62 | github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= 63 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 64 | golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 65 | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 66 | golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 67 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 68 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 69 | golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= 70 | golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= 71 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 72 | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 73 | golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 74 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 75 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 76 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 77 | golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 78 | golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 79 | golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 80 | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 81 | golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 82 | golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 83 | golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk= 84 | golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= 85 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 86 | golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 87 | golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= 88 | golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q= 89 | golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg= 90 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 91 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 92 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 93 | golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= 94 | golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 95 | golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU= 96 | golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= 97 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 98 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 99 | golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 100 | golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 101 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 102 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 103 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 104 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 105 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 106 | mvdan.cc/sh/v3 v3.12.0 h1:ejKUR7ONP5bb+UGHGEG/k9V5+pRVIyD+LsZz7o8KHrI= 107 | mvdan.cc/sh/v3 v3.12.0/go.mod h1:Se6Cj17eYSn+sNooLZiEUnNNmNxg0imoYlTu4CyaGyg= 108 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "archive/tar" 5 | "bufio" 6 | "bytes" 7 | "encoding/json" 8 | "errors" 9 | "flag" 10 | "fmt" 11 | "io" 12 | "log" 13 | "os" 14 | "os/exec" 15 | "path/filepath" 16 | "runtime" 17 | "sort" 18 | "strings" 19 | 20 | "github.com/atotto/clipboard" 21 | "github.com/dustin/go-humanize" 22 | "github.com/gdamore/tcell/v2" 23 | "github.com/pkg/profile" 24 | "github.com/rivo/tview" 25 | "mvdan.cc/sh/v3/syntax" 26 | ) 27 | 28 | type FileInfo struct { 29 | Name string 30 | Size int64 31 | Details *FileDetails 32 | } 33 | 34 | type FileDetails struct { 35 | FileMode os.FileMode 36 | Uid int 37 | Gid int 38 | } 39 | 40 | type Layer struct { 41 | FileName string 42 | CreatedBy string 43 | Files []*FileInfo 44 | } 45 | 46 | type Image struct { 47 | Tags []string 48 | Layers []*Layer 49 | } 50 | 51 | const ( 52 | humanizedWidth = 7 53 | ) 54 | 55 | func main() { 56 | log.SetFlags(0) 57 | log.SetPrefix("dlayer: ") 58 | if err := run(); err != nil { 59 | log.Fatal(err) 60 | } 61 | } 62 | 63 | func run() error { 64 | if os.Getenv("DLAYER_PROFILE") != "" { 65 | defer profile.Start().Stop() 66 | } 67 | tarPath := flag.String("f", "-", "image.tar path") 68 | maxFiles := flag.Int("n", 100, "max files") 69 | lineWidth := flag.Int("l", 100, "screen line width") 70 | maxDepth := flag.Int("d", 8, "max depth") 71 | all := flag.Bool("a", false, "show details") 72 | interactive := flag.Bool("i", false, "interactive mode") 73 | defaultArch := flag.String("arch", getEnv("DLAYER_ARCH", runtime.GOARCH), "default architecture") 74 | tag := flag.String("tag", "", "tag") 75 | flag.Parse() 76 | 77 | if *interactive { 78 | locale := getLocale() 79 | if locale != "" && locale != "en_US.UTF-8" { 80 | binPath, err := os.Executable() 81 | if err != nil { 82 | return fmt.Errorf("get executable: %w", err) 83 | } 84 | cmd := exec.Command(binPath, os.Args[1:]...) 85 | cmd.Stdin = os.Stdin 86 | cmd.Stderr = os.Stderr 87 | cmd.Stdout = os.Stdout 88 | cmd.Env = append(os.Environ(), `LC_CTYPE=en_US.UTF-8`) 89 | return cmd.Run() 90 | } 91 | } 92 | 93 | rc, err := openStream(*tarPath) 94 | if err != nil { 95 | return fmt.Errorf("open tar: %w", err) 96 | } 97 | img, err := readImage(rc, *tag, *defaultArch) 98 | if err != nil { 99 | return fmt.Errorf("read image: %w", err) 100 | } 101 | 102 | if *interactive { 103 | return runInteractive(img) 104 | } 105 | 106 | for _, layer := range img.Layers { 107 | var cmd string 108 | tokens := strings.SplitN(layer.CreatedBy, "/bin/sh -c ", 2) 109 | if len(tokens) == 2 { // for docker build v1 case 110 | cmd = formatShellScript(tokens[1]) 111 | } else { 112 | cmd = layer.CreatedBy 113 | } 114 | 115 | layerSize := int64(0) 116 | outputMap := make(map[string]int64) 117 | byName := make(map[string]*FileInfo) 118 | for _, f := range layer.Files { 119 | byName[f.Name] = f 120 | 121 | layerSize += f.Size 122 | tokens := strings.Split(f.Name, "/") 123 | if len(tokens) > *maxDepth { 124 | tokens = tokens[:*maxDepth] 125 | } 126 | key := strings.Join(tokens, "/") 127 | 128 | outputMap[key] += f.Size 129 | } 130 | 131 | files := make([]*FileInfo, 0, len(outputMap)) 132 | for k, v := range outputMap { 133 | fi := &FileInfo{ 134 | Name: k, 135 | Size: v, 136 | } 137 | if f, ok := byName[k]; ok { 138 | fi.Details = f.Details 139 | } 140 | files = append(files, fi) 141 | } 142 | 143 | fmt.Println() 144 | fmt.Println(strings.Repeat("=", *lineWidth)) 145 | fmt.Println(humanizeBytes(layerSize), "\t $", cmd) 146 | fmt.Println(strings.Repeat("=", *lineWidth)) 147 | sort.Slice(files, func(i, j int) bool { 148 | lhs := files[i] 149 | rhs := files[j] 150 | if lhs.Size != rhs.Size { 151 | return lhs.Size > rhs.Size 152 | } 153 | return lhs.Name < rhs.Name 154 | }) 155 | for j, f := range files { 156 | if j >= *maxFiles { 157 | break 158 | } 159 | if *all { 160 | if f.Details != nil { 161 | fmt.Println(humanizeBytes(f.Size), fmt.Sprintf("%5d:%-5d", f.Details.Gid, f.Details.Uid), f.Details.FileMode.String(), f.Name) 162 | } else { 163 | fmt.Println(humanizeBytes(f.Size), strings.Repeat(" ", 22), f.Name) 164 | } 165 | } else { 166 | fmt.Println(humanizeBytes(f.Size), "\t", f.Name) 167 | } 168 | } 169 | } 170 | 171 | return nil 172 | } 173 | 174 | func formatShellScript(shellScript string) string { 175 | parser := syntax.NewParser(syntax.KeepComments(true), syntax.Variant(syntax.LangPOSIX)) 176 | prog, err := parser.Parse(strings.NewReader(shellScript), "") 177 | if err != nil { 178 | return shellScript 179 | } 180 | 181 | printer := syntax.NewPrinter(syntax.Indent(4), syntax.BinaryNextLine(true), syntax.SwitchCaseIndent(true)) 182 | var buf bytes.Buffer 183 | printer.Print(&buf, prog) 184 | formatted := strings.TrimSuffix(buf.String(), "\n") 185 | if strings.Contains(formatted, "\n") { 186 | formatted = "# multiple line script\n" + formatted 187 | } 188 | return formatted 189 | } 190 | 191 | func readImage(rc io.ReadCloser, tag, arch string) (*Image, error) { 192 | defer rc.Close() 193 | 194 | type Manifest struct { 195 | Config string 196 | RepoTags []string 197 | Layers []string 198 | } 199 | var manifests []Manifest 200 | type Config struct { 201 | Architecture string `json:"architecture"` 202 | History []struct { 203 | EmptyLayer bool `json:"empty_layer,omitempty"` 204 | CreatedBy string `json:"created_by,omitempty"` 205 | } `json:"history,omitempty"` 206 | } 207 | configs := make(map[string]*Config) 208 | files := make(map[string][]*FileInfo) 209 | var r io.Reader = rc 210 | if bufSize := os.Getenv("DLAYER_BUFFER_SIZE"); bufSize != "" { 211 | bufBytes, err := humanize.ParseBytes(bufSize) 212 | if err != nil { 213 | return nil, fmt.Errorf("parse buffer size: %w", err) 214 | } 215 | r = bufio.NewReaderSize(r, int(bufBytes)) 216 | } 217 | archive := tar.NewReader(r) 218 | for { 219 | hdr, err := archive.Next() 220 | if err == io.EOF { 221 | break 222 | } 223 | if err != nil { 224 | return nil, fmt.Errorf("next: %w", err) 225 | } 226 | if hdr.FileInfo().IsDir() { 227 | continue 228 | } 229 | 230 | isTar := false 231 | var ar io.Reader = archive 232 | if strings.HasPrefix(hdr.Name, "blobs/") { 233 | var head [262]byte 234 | _, err := io.ReadFull(archive, head[:]) 235 | if err == nil { 236 | isTar = bytes.HasSuffix(head[:], []byte("ustar")) 237 | ar = io.MultiReader(bytes.NewReader(head[:]), archive) 238 | } else if !errors.Is(err, io.ErrUnexpectedEOF) { 239 | return nil, fmt.Errorf("read blob(%s): %w", hdr.Name, err) 240 | } 241 | } 242 | 243 | switch { 244 | case hdr.Name == "manifest.json": 245 | if err := json.NewDecoder(ar).Decode(&manifests); err != nil { 246 | return nil, fmt.Errorf("decode manifest: %w", err) 247 | } 248 | case strings.HasSuffix(hdr.Name, "/layer.tar") || isTar: 249 | fs, err := readFiles(ar) 250 | if err != nil { 251 | return nil, fmt.Errorf("read layer(%s): %w", hdr.Name, err) 252 | } 253 | files[hdr.Name] = fs 254 | case strings.HasSuffix(hdr.Name, ".json"): 255 | var config Config 256 | if err := json.NewDecoder(ar).Decode(&config); err != nil { 257 | return nil, fmt.Errorf("decode meta(%s): %w", hdr.Name, err) 258 | } 259 | configs[hdr.Name] = &config 260 | default: 261 | var config Config 262 | if err := json.NewDecoder(ar).Decode(&config); err == nil { 263 | configs[hdr.Name] = &config 264 | } 265 | } 266 | } 267 | 268 | if len(manifests) == 0 { 269 | return nil, fmt.Errorf("manifest.json not found") 270 | } 271 | 272 | var manifest *Manifest 273 | if len(manifests) == 1 { 274 | manifest = &manifests[0] 275 | } else { 276 | for i := range manifests { 277 | if tag != "" { 278 | matched := false 279 | for _, t := range manifests[i].RepoTags { 280 | if strings.HasSuffix(t, ":"+tag) { 281 | matched = true 282 | break 283 | } 284 | } 285 | if !matched { 286 | continue 287 | } 288 | } 289 | if configs[manifests[i].Config].Architecture == arch { 290 | manifest = &manifests[i] 291 | break 292 | } 293 | } 294 | if manifest == nil { 295 | log.Print("available manifests:") 296 | for _, m := range manifests { 297 | for _, t := range m.RepoTags { 298 | log.Println("-", t, configs[m.Config].Architecture) 299 | } 300 | } 301 | return nil, fmt.Errorf("config not found(arch=%s)", arch) 302 | } 303 | } 304 | config := configs[manifest.Config] 305 | history := config.History[:0] 306 | for _, layer := range config.History { 307 | if !layer.EmptyLayer { 308 | history = append(history, layer) 309 | } 310 | } 311 | 312 | var layers []*Layer 313 | for i, layer := range history { 314 | name := manifest.Layers[i] 315 | fs := files[name] 316 | layers = append(layers, &Layer{ 317 | FileName: name, 318 | CreatedBy: layer.CreatedBy, 319 | Files: fs, 320 | }) 321 | } 322 | 323 | return &Image{ 324 | Tags: manifest.RepoTags, 325 | Layers: layers, 326 | }, nil 327 | } 328 | 329 | func readFiles(r io.Reader) ([]*FileInfo, error) { 330 | var files []*FileInfo 331 | archive := tar.NewReader(r) 332 | for { 333 | hdr, err := archive.Next() 334 | if err == io.EOF { 335 | break 336 | } 337 | if err != nil { 338 | return nil, fmt.Errorf("next: %w", err) 339 | } 340 | fi := hdr.FileInfo() 341 | if fi.IsDir() { 342 | continue 343 | } 344 | files = append(files, &FileInfo{ 345 | Name: filepath.Clean(hdr.Name), 346 | Size: fi.Size(), 347 | Details: &FileDetails{ 348 | FileMode: fi.Mode().Perm(), 349 | Uid: hdr.Uid, 350 | Gid: hdr.Gid, 351 | }, 352 | }) 353 | } 354 | return files, nil 355 | } 356 | 357 | func openStream(path string) (io.ReadCloser, error) { 358 | if path == "-" { 359 | return os.Stdin, nil 360 | } else { 361 | return os.Open(path) 362 | } 363 | } 364 | 365 | func humanizeBytes(sz int64) string { 366 | if sz < 1000 { 367 | return pad(fmt.Sprintf("%d B", sz), humanizedWidth) 368 | } else { 369 | return pad(humanize.Bytes(uint64(sz)), humanizedWidth) 370 | } 371 | } 372 | 373 | func pad(s string, n int) string { 374 | return strings.Repeat(" ", n-len(s)) + s 375 | } 376 | 377 | func getLocale() string { 378 | ctype := os.Getenv("LC_CTYPE") 379 | if ctype != "" { 380 | return ctype 381 | } 382 | return os.Getenv("LANG") 383 | } 384 | 385 | func getEnv(key, v string) string { 386 | x := os.Getenv(key) 387 | if x == "" { 388 | return v 389 | } 390 | return x 391 | } 392 | 393 | func runInteractive(img *Image) error { 394 | app := tview.NewApplication() 395 | 396 | rootDir := strings.Join(img.Tags, ", ") 397 | root := tview.NewTreeNode(rootDir) 398 | tree := tview.NewTreeView(). 399 | SetRoot(root). 400 | SetCurrentNode(root) 401 | navi := tview.NewTextView() 402 | 403 | for _, layer := range img.Layers { 404 | text := strings.TrimPrefix(layer.CreatedBy, "/bin/sh -c ") 405 | switch { 406 | case strings.HasPrefix(text, "RUN "): 407 | case strings.HasPrefix(text, "COPY "): 408 | case strings.HasPrefix(text, "ADD "): 409 | case strings.HasPrefix(text, "WORKDIR "): 410 | case strings.HasPrefix(text, "#(nop) "): 411 | text = strings.TrimPrefix(text, "#(nop) ") 412 | default: 413 | text = "RUN " + text 414 | } 415 | tn := tview.NewTreeNode(text) 416 | tn.SetReference(layer) 417 | addFiles(tn, layer.Files, nil) 418 | root.AddChild(tn) 419 | } 420 | 421 | tree.SetSelectedFunc(func(node *tview.TreeNode) { 422 | open := !node.IsExpanded() 423 | node.SetExpanded(open) 424 | if open { 425 | children := node.GetChildren() 426 | for len(children) == 1 { 427 | child := children[0] 428 | child.SetExpanded(true) 429 | children = child.GetChildren() 430 | } 431 | } 432 | }) 433 | 434 | tree.SetInputCapture(func(e *tcell.EventKey) *tcell.EventKey { 435 | switch e.Rune() { 436 | case 'q': 437 | app.Stop() 438 | case 'u': 439 | node, ok := tree.GetCurrentNode().GetReference().(*TreeNode) 440 | if ok && node.parent != nil { 441 | node.parent.value.SetExpanded(false) 442 | tree.SetCurrentNode(node.parent.value) 443 | } 444 | case 'y': 445 | _ = clipboard.WriteAll(navi.GetText(true)) 446 | } 447 | return e 448 | }) 449 | 450 | tree.SetChangedFunc(func(target *tview.TreeNode) { 451 | node, ok := target.GetReference().(*TreeNode) 452 | if ok { 453 | navi.SetText(node.ExtractCommand()) 454 | } else { 455 | navi.SetText("") 456 | } 457 | }) 458 | flex := tview.NewFlex(). 459 | SetDirection(tview.FlexRow). 460 | AddItem(tree, 0, 1, true). 461 | AddItem(navi, 1, 0, false) 462 | return app.SetRoot(flex, true).SetFocus(flex).Run() 463 | } 464 | 465 | type TreeNode struct { 466 | layerFile string 467 | parent *TreeNode 468 | value *tview.TreeNode 469 | key string 470 | dir bool 471 | } 472 | 473 | func (n *TreeNode) Path() string { 474 | if n.parent == nil { 475 | return n.key 476 | } 477 | return n.parent.Path() + "/" + n.key 478 | } 479 | 480 | func (n *TreeNode) ExtractCommand() string { 481 | layerCmd := "tar xO " + n.layerFile 482 | if n.dir { 483 | return layerCmd + " | tar x " + n.Path() 484 | } else { 485 | return layerCmd + " | tar xO " + n.Path() 486 | } 487 | } 488 | 489 | func addFiles(node *tview.TreeNode, files []*FileInfo, parent *TreeNode) int64 { 490 | tree := make(map[string][]*FileInfo) 491 | size := int64(0) 492 | for _, f := range files { 493 | size += f.Size 494 | if f.Name == "" { 495 | continue 496 | } 497 | xs := strings.SplitN(f.Name, "/", 2) 498 | key := xs[0] 499 | child := "" 500 | if len(xs) == 2 { 501 | child = xs[1] 502 | } 503 | tree[key] = append(tree[key], &FileInfo{Name: child, Size: f.Size}) 504 | } 505 | 506 | type entry struct { 507 | node *TreeNode 508 | size int64 509 | } 510 | entries := make([]*entry, 0, len(tree)) 511 | for key := range tree { 512 | t := tview.NewTreeNode(key) 513 | child := &TreeNode{ 514 | parent: parent, 515 | value: t, 516 | key: key, 517 | } 518 | if parent != nil { 519 | child.layerFile = parent.layerFile 520 | } else { 521 | child.layerFile = node.GetReference().(*Layer).FileName 522 | } 523 | s := addFiles(t, tree[key], child) 524 | entries = append(entries, &entry{ 525 | node: child, 526 | size: s, 527 | }) 528 | } 529 | sort.Slice(entries, func(i, j int) bool { 530 | return entries[i].size > entries[j].size 531 | }) 532 | for _, e := range entries { 533 | node.AddChild(e.node.value) 534 | e.node.value.SetReference(e.node) 535 | } 536 | text := humanizeBytes(size) + ": " + node.GetText() 537 | if parent != nil && len(entries) > 0 { 538 | text += "/" 539 | parent.dir = true 540 | } 541 | node.SetText(text) 542 | node.SetExpanded(false) 543 | return size 544 | } 545 | -------------------------------------------------------------------------------- /CREDITS: -------------------------------------------------------------------------------- 1 | Go (the standard library) 2 | https://golang.org/ 3 | ---------------------------------------------------------------- 4 | Copyright 2009 The Go Authors. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are 8 | met: 9 | 10 | * Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above 13 | copyright notice, this list of conditions and the following disclaimer 14 | in the documentation and/or other materials provided with the 15 | distribution. 16 | * Neither the name of Google LLC nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | ================================================================ 33 | 34 | github.com/atotto/clipboard 35 | https://github.com/atotto/clipboard 36 | ---------------------------------------------------------------- 37 | Copyright (c) 2013 Ato Araki. All rights reserved. 38 | 39 | Redistribution and use in source and binary forms, with or without 40 | modification, are permitted provided that the following conditions are 41 | met: 42 | 43 | * Redistributions of source code must retain the above copyright 44 | notice, this list of conditions and the following disclaimer. 45 | * Redistributions in binary form must reproduce the above 46 | copyright notice, this list of conditions and the following disclaimer 47 | in the documentation and/or other materials provided with the 48 | distribution. 49 | * Neither the name of @atotto. nor the names of its 50 | contributors may be used to endorse or promote products derived from 51 | this software without specific prior written permission. 52 | 53 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 54 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 55 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 56 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 57 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 58 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 59 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 60 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 61 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 62 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 63 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 64 | 65 | ================================================================ 66 | 67 | github.com/davecgh/go-spew 68 | https://github.com/davecgh/go-spew 69 | ---------------------------------------------------------------- 70 | ISC License 71 | 72 | Copyright (c) 2012-2016 Dave Collins 73 | 74 | Permission to use, copy, modify, and/or distribute this software for any 75 | purpose with or without fee is hereby granted, provided that the above 76 | copyright notice and this permission notice appear in all copies. 77 | 78 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 79 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 80 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 81 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 82 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 83 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 84 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 85 | 86 | ================================================================ 87 | 88 | github.com/dustin/go-humanize 89 | https://github.com/dustin/go-humanize 90 | ---------------------------------------------------------------- 91 | Copyright (c) 2005-2008 Dustin Sallings 92 | 93 | Permission is hereby granted, free of charge, to any person obtaining a copy 94 | of this software and associated documentation files (the "Software"), to deal 95 | in the Software without restriction, including without limitation the rights 96 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 97 | copies of the Software, and to permit persons to whom the Software is 98 | furnished to do so, subject to the following conditions: 99 | 100 | The above copyright notice and this permission notice shall be included in 101 | all copies or substantial portions of the Software. 102 | 103 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 104 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 105 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 106 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 107 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 108 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 109 | SOFTWARE. 110 | 111 | 112 | 113 | ================================================================ 114 | 115 | github.com/felixge/fgprof 116 | https://github.com/felixge/fgprof 117 | ---------------------------------------------------------------- 118 | The MIT License (MIT) 119 | Copyright © 2020 Felix Geisendörfer 120 | 121 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 122 | 123 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 124 | 125 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 126 | 127 | ================================================================ 128 | 129 | github.com/gdamore/encoding 130 | https://github.com/gdamore/encoding 131 | ---------------------------------------------------------------- 132 | 133 | Apache License 134 | Version 2.0, January 2004 135 | http://www.apache.org/licenses/ 136 | 137 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 138 | 139 | 1. Definitions. 140 | 141 | "License" shall mean the terms and conditions for use, reproduction, 142 | and distribution as defined by Sections 1 through 9 of this document. 143 | 144 | "Licensor" shall mean the copyright owner or entity authorized by 145 | the copyright owner that is granting the License. 146 | 147 | "Legal Entity" shall mean the union of the acting entity and all 148 | other entities that control, are controlled by, or are under common 149 | control with that entity. For the purposes of this definition, 150 | "control" means (i) the power, direct or indirect, to cause the 151 | direction or management of such entity, whether by contract or 152 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 153 | outstanding shares, or (iii) beneficial ownership of such entity. 154 | 155 | "You" (or "Your") shall mean an individual or Legal Entity 156 | exercising permissions granted by this License. 157 | 158 | "Source" form shall mean the preferred form for making modifications, 159 | including but not limited to software source code, documentation 160 | source, and configuration files. 161 | 162 | "Object" form shall mean any form resulting from mechanical 163 | transformation or translation of a Source form, including but 164 | not limited to compiled object code, generated documentation, 165 | and conversions to other media types. 166 | 167 | "Work" shall mean the work of authorship, whether in Source or 168 | Object form, made available under the License, as indicated by a 169 | copyright notice that is included in or attached to the work 170 | (an example is provided in the Appendix below). 171 | 172 | "Derivative Works" shall mean any work, whether in Source or Object 173 | form, that is based on (or derived from) the Work and for which the 174 | editorial revisions, annotations, elaborations, or other modifications 175 | represent, as a whole, an original work of authorship. For the purposes 176 | of this License, Derivative Works shall not include works that remain 177 | separable from, or merely link (or bind by name) to the interfaces of, 178 | the Work and Derivative Works thereof. 179 | 180 | "Contribution" shall mean any work of authorship, including 181 | the original version of the Work and any modifications or additions 182 | to that Work or Derivative Works thereof, that is intentionally 183 | submitted to Licensor for inclusion in the Work by the copyright owner 184 | or by an individual or Legal Entity authorized to submit on behalf of 185 | the copyright owner. For the purposes of this definition, "submitted" 186 | means any form of electronic, verbal, or written communication sent 187 | to the Licensor or its representatives, including but not limited to 188 | communication on electronic mailing lists, source code control systems, 189 | and issue tracking systems that are managed by, or on behalf of, the 190 | Licensor for the purpose of discussing and improving the Work, but 191 | excluding communication that is conspicuously marked or otherwise 192 | designated in writing by the copyright owner as "Not a Contribution." 193 | 194 | "Contributor" shall mean Licensor and any individual or Legal Entity 195 | on behalf of whom a Contribution has been received by Licensor and 196 | subsequently incorporated within the Work. 197 | 198 | 2. Grant of Copyright License. Subject to the terms and conditions of 199 | this License, each Contributor hereby grants to You a perpetual, 200 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 201 | copyright license to reproduce, prepare Derivative Works of, 202 | publicly display, publicly perform, sublicense, and distribute the 203 | Work and such Derivative Works in Source or Object form. 204 | 205 | 3. Grant of Patent License. Subject to the terms and conditions of 206 | this License, each Contributor hereby grants to You a perpetual, 207 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 208 | (except as stated in this section) patent license to make, have made, 209 | use, offer to sell, sell, import, and otherwise transfer the Work, 210 | where such license applies only to those patent claims licensable 211 | by such Contributor that are necessarily infringed by their 212 | Contribution(s) alone or by combination of their Contribution(s) 213 | with the Work to which such Contribution(s) was submitted. If You 214 | institute patent litigation against any entity (including a 215 | cross-claim or counterclaim in a lawsuit) alleging that the Work 216 | or a Contribution incorporated within the Work constitutes direct 217 | or contributory patent infringement, then any patent licenses 218 | granted to You under this License for that Work shall terminate 219 | as of the date such litigation is filed. 220 | 221 | 4. Redistribution. You may reproduce and distribute copies of the 222 | Work or Derivative Works thereof in any medium, with or without 223 | modifications, and in Source or Object form, provided that You 224 | meet the following conditions: 225 | 226 | (a) You must give any other recipients of the Work or 227 | Derivative Works a copy of this License; and 228 | 229 | (b) You must cause any modified files to carry prominent notices 230 | stating that You changed the files; and 231 | 232 | (c) You must retain, in the Source form of any Derivative Works 233 | that You distribute, all copyright, patent, trademark, and 234 | attribution notices from the Source form of the Work, 235 | excluding those notices that do not pertain to any part of 236 | the Derivative Works; and 237 | 238 | (d) If the Work includes a "NOTICE" text file as part of its 239 | distribution, then any Derivative Works that You distribute must 240 | include a readable copy of the attribution notices contained 241 | within such NOTICE file, excluding those notices that do not 242 | pertain to any part of the Derivative Works, in at least one 243 | of the following places: within a NOTICE text file distributed 244 | as part of the Derivative Works; within the Source form or 245 | documentation, if provided along with the Derivative Works; or, 246 | within a display generated by the Derivative Works, if and 247 | wherever such third-party notices normally appear. The contents 248 | of the NOTICE file are for informational purposes only and 249 | do not modify the License. You may add Your own attribution 250 | notices within Derivative Works that You distribute, alongside 251 | or as an addendum to the NOTICE text from the Work, provided 252 | that such additional attribution notices cannot be construed 253 | as modifying the License. 254 | 255 | You may add Your own copyright statement to Your modifications and 256 | may provide additional or different license terms and conditions 257 | for use, reproduction, or distribution of Your modifications, or 258 | for any such Derivative Works as a whole, provided Your use, 259 | reproduction, and distribution of the Work otherwise complies with 260 | the conditions stated in this License. 261 | 262 | 5. Submission of Contributions. Unless You explicitly state otherwise, 263 | any Contribution intentionally submitted for inclusion in the Work 264 | by You to the Licensor shall be under the terms and conditions of 265 | this License, without any additional terms or conditions. 266 | Notwithstanding the above, nothing herein shall supersede or modify 267 | the terms of any separate license agreement you may have executed 268 | with Licensor regarding such Contributions. 269 | 270 | 6. Trademarks. This License does not grant permission to use the trade 271 | names, trademarks, service marks, or product names of the Licensor, 272 | except as required for reasonable and customary use in describing the 273 | origin of the Work and reproducing the content of the NOTICE file. 274 | 275 | 7. Disclaimer of Warranty. Unless required by applicable law or 276 | agreed to in writing, Licensor provides the Work (and each 277 | Contributor provides its Contributions) on an "AS IS" BASIS, 278 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 279 | implied, including, without limitation, any warranties or conditions 280 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 281 | PARTICULAR PURPOSE. You are solely responsible for determining the 282 | appropriateness of using or redistributing the Work and assume any 283 | risks associated with Your exercise of permissions under this License. 284 | 285 | 8. Limitation of Liability. In no event and under no legal theory, 286 | whether in tort (including negligence), contract, or otherwise, 287 | unless required by applicable law (such as deliberate and grossly 288 | negligent acts) or agreed to in writing, shall any Contributor be 289 | liable to You for damages, including any direct, indirect, special, 290 | incidental, or consequential damages of any character arising as a 291 | result of this License or out of the use or inability to use the 292 | Work (including but not limited to damages for loss of goodwill, 293 | work stoppage, computer failure or malfunction, or any and all 294 | other commercial damages or losses), even if such Contributor 295 | has been advised of the possibility of such damages. 296 | 297 | 9. Accepting Warranty or Additional Liability. While redistributing 298 | the Work or Derivative Works thereof, You may choose to offer, 299 | and charge a fee for, acceptance of support, warranty, indemnity, 300 | or other liability obligations and/or rights consistent with this 301 | License. However, in accepting such obligations, You may act only 302 | on Your own behalf and on Your sole responsibility, not on behalf 303 | of any other Contributor, and only if You agree to indemnify, 304 | defend, and hold each Contributor harmless for any liability 305 | incurred by, or claims asserted against, such Contributor by reason 306 | of your accepting any such warranty or additional liability. 307 | 308 | END OF TERMS AND CONDITIONS 309 | 310 | APPENDIX: How to apply the Apache License to your work. 311 | 312 | To apply the Apache License to your work, attach the following 313 | boilerplate notice, with the fields enclosed by brackets "[]" 314 | replaced with your own identifying information. (Don't include 315 | the brackets!) The text should be enclosed in the appropriate 316 | comment syntax for the file format. We also recommend that a 317 | file or class name and description of purpose be included on the 318 | same "printed page" as the copyright notice for easier 319 | identification within third-party archives. 320 | 321 | Copyright [yyyy] [name of copyright owner] 322 | 323 | Licensed under the Apache License, Version 2.0 (the "License"); 324 | you may not use this file except in compliance with the License. 325 | You may obtain a copy of the License at 326 | 327 | http://www.apache.org/licenses/LICENSE-2.0 328 | 329 | Unless required by applicable law or agreed to in writing, software 330 | distributed under the License is distributed on an "AS IS" BASIS, 331 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 332 | See the License for the specific language governing permissions and 333 | limitations under the License. 334 | 335 | ================================================================ 336 | 337 | github.com/gdamore/tcell/v2 338 | https://github.com/gdamore/tcell/v2 339 | ---------------------------------------------------------------- 340 | 341 | Apache License 342 | Version 2.0, January 2004 343 | http://www.apache.org/licenses/ 344 | 345 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 346 | 347 | 1. Definitions. 348 | 349 | "License" shall mean the terms and conditions for use, reproduction, 350 | and distribution as defined by Sections 1 through 9 of this document. 351 | 352 | "Licensor" shall mean the copyright owner or entity authorized by 353 | the copyright owner that is granting the License. 354 | 355 | "Legal Entity" shall mean the union of the acting entity and all 356 | other entities that control, are controlled by, or are under common 357 | control with that entity. For the purposes of this definition, 358 | "control" means (i) the power, direct or indirect, to cause the 359 | direction or management of such entity, whether by contract or 360 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 361 | outstanding shares, or (iii) beneficial ownership of such entity. 362 | 363 | "You" (or "Your") shall mean an individual or Legal Entity 364 | exercising permissions granted by this License. 365 | 366 | "Source" form shall mean the preferred form for making modifications, 367 | including but not limited to software source code, documentation 368 | source, and configuration files. 369 | 370 | "Object" form shall mean any form resulting from mechanical 371 | transformation or translation of a Source form, including but 372 | not limited to compiled object code, generated documentation, 373 | and conversions to other media types. 374 | 375 | "Work" shall mean the work of authorship, whether in Source or 376 | Object form, made available under the License, as indicated by a 377 | copyright notice that is included in or attached to the work 378 | (an example is provided in the Appendix below). 379 | 380 | "Derivative Works" shall mean any work, whether in Source or Object 381 | form, that is based on (or derived from) the Work and for which the 382 | editorial revisions, annotations, elaborations, or other modifications 383 | represent, as a whole, an original work of authorship. For the purposes 384 | of this License, Derivative Works shall not include works that remain 385 | separable from, or merely link (or bind by name) to the interfaces of, 386 | the Work and Derivative Works thereof. 387 | 388 | "Contribution" shall mean any work of authorship, including 389 | the original version of the Work and any modifications or additions 390 | to that Work or Derivative Works thereof, that is intentionally 391 | submitted to Licensor for inclusion in the Work by the copyright owner 392 | or by an individual or Legal Entity authorized to submit on behalf of 393 | the copyright owner. For the purposes of this definition, "submitted" 394 | means any form of electronic, verbal, or written communication sent 395 | to the Licensor or its representatives, including but not limited to 396 | communication on electronic mailing lists, source code control systems, 397 | and issue tracking systems that are managed by, or on behalf of, the 398 | Licensor for the purpose of discussing and improving the Work, but 399 | excluding communication that is conspicuously marked or otherwise 400 | designated in writing by the copyright owner as "Not a Contribution." 401 | 402 | "Contributor" shall mean Licensor and any individual or Legal Entity 403 | on behalf of whom a Contribution has been received by Licensor and 404 | subsequently incorporated within the Work. 405 | 406 | 2. Grant of Copyright License. Subject to the terms and conditions of 407 | this License, each Contributor hereby grants to You a perpetual, 408 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 409 | copyright license to reproduce, prepare Derivative Works of, 410 | publicly display, publicly perform, sublicense, and distribute the 411 | Work and such Derivative Works in Source or Object form. 412 | 413 | 3. Grant of Patent License. Subject to the terms and conditions of 414 | this License, each Contributor hereby grants to You a perpetual, 415 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 416 | (except as stated in this section) patent license to make, have made, 417 | use, offer to sell, sell, import, and otherwise transfer the Work, 418 | where such license applies only to those patent claims licensable 419 | by such Contributor that are necessarily infringed by their 420 | Contribution(s) alone or by combination of their Contribution(s) 421 | with the Work to which such Contribution(s) was submitted. If You 422 | institute patent litigation against any entity (including a 423 | cross-claim or counterclaim in a lawsuit) alleging that the Work 424 | or a Contribution incorporated within the Work constitutes direct 425 | or contributory patent infringement, then any patent licenses 426 | granted to You under this License for that Work shall terminate 427 | as of the date such litigation is filed. 428 | 429 | 4. Redistribution. You may reproduce and distribute copies of the 430 | Work or Derivative Works thereof in any medium, with or without 431 | modifications, and in Source or Object form, provided that You 432 | meet the following conditions: 433 | 434 | (a) You must give any other recipients of the Work or 435 | Derivative Works a copy of this License; and 436 | 437 | (b) You must cause any modified files to carry prominent notices 438 | stating that You changed the files; and 439 | 440 | (c) You must retain, in the Source form of any Derivative Works 441 | that You distribute, all copyright, patent, trademark, and 442 | attribution notices from the Source form of the Work, 443 | excluding those notices that do not pertain to any part of 444 | the Derivative Works; and 445 | 446 | (d) If the Work includes a "NOTICE" text file as part of its 447 | distribution, then any Derivative Works that You distribute must 448 | include a readable copy of the attribution notices contained 449 | within such NOTICE file, excluding those notices that do not 450 | pertain to any part of the Derivative Works, in at least one 451 | of the following places: within a NOTICE text file distributed 452 | as part of the Derivative Works; within the Source form or 453 | documentation, if provided along with the Derivative Works; or, 454 | within a display generated by the Derivative Works, if and 455 | wherever such third-party notices normally appear. The contents 456 | of the NOTICE file are for informational purposes only and 457 | do not modify the License. You may add Your own attribution 458 | notices within Derivative Works that You distribute, alongside 459 | or as an addendum to the NOTICE text from the Work, provided 460 | that such additional attribution notices cannot be construed 461 | as modifying the License. 462 | 463 | You may add Your own copyright statement to Your modifications and 464 | may provide additional or different license terms and conditions 465 | for use, reproduction, or distribution of Your modifications, or 466 | for any such Derivative Works as a whole, provided Your use, 467 | reproduction, and distribution of the Work otherwise complies with 468 | the conditions stated in this License. 469 | 470 | 5. Submission of Contributions. Unless You explicitly state otherwise, 471 | any Contribution intentionally submitted for inclusion in the Work 472 | by You to the Licensor shall be under the terms and conditions of 473 | this License, without any additional terms or conditions. 474 | Notwithstanding the above, nothing herein shall supersede or modify 475 | the terms of any separate license agreement you may have executed 476 | with Licensor regarding such Contributions. 477 | 478 | 6. Trademarks. This License does not grant permission to use the trade 479 | names, trademarks, service marks, or product names of the Licensor, 480 | except as required for reasonable and customary use in describing the 481 | origin of the Work and reproducing the content of the NOTICE file. 482 | 483 | 7. Disclaimer of Warranty. Unless required by applicable law or 484 | agreed to in writing, Licensor provides the Work (and each 485 | Contributor provides its Contributions) on an "AS IS" BASIS, 486 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 487 | implied, including, without limitation, any warranties or conditions 488 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 489 | PARTICULAR PURPOSE. You are solely responsible for determining the 490 | appropriateness of using or redistributing the Work and assume any 491 | risks associated with Your exercise of permissions under this License. 492 | 493 | 8. Limitation of Liability. In no event and under no legal theory, 494 | whether in tort (including negligence), contract, or otherwise, 495 | unless required by applicable law (such as deliberate and grossly 496 | negligent acts) or agreed to in writing, shall any Contributor be 497 | liable to You for damages, including any direct, indirect, special, 498 | incidental, or consequential damages of any character arising as a 499 | result of this License or out of the use or inability to use the 500 | Work (including but not limited to damages for loss of goodwill, 501 | work stoppage, computer failure or malfunction, or any and all 502 | other commercial damages or losses), even if such Contributor 503 | has been advised of the possibility of such damages. 504 | 505 | 9. Accepting Warranty or Additional Liability. While redistributing 506 | the Work or Derivative Works thereof, You may choose to offer, 507 | and charge a fee for, acceptance of support, warranty, indemnity, 508 | or other liability obligations and/or rights consistent with this 509 | License. However, in accepting such obligations, You may act only 510 | on Your own behalf and on Your sole responsibility, not on behalf 511 | of any other Contributor, and only if You agree to indemnify, 512 | defend, and hold each Contributor harmless for any liability 513 | incurred by, or claims asserted against, such Contributor by reason 514 | of your accepting any such warranty or additional liability. 515 | 516 | END OF TERMS AND CONDITIONS 517 | 518 | APPENDIX: How to apply the Apache License to your work. 519 | 520 | To apply the Apache License to your work, attach the following 521 | boilerplate notice, with the fields enclosed by brackets "[]" 522 | replaced with your own identifying information. (Don't include 523 | the brackets!) The text should be enclosed in the appropriate 524 | comment syntax for the file format. We also recommend that a 525 | file or class name and description of purpose be included on the 526 | same "printed page" as the copyright notice for easier 527 | identification within third-party archives. 528 | 529 | Copyright [yyyy] [name of copyright owner] 530 | 531 | Licensed under the Apache License, Version 2.0 (the "License"); 532 | you may not use this file except in compliance with the License. 533 | You may obtain a copy of the License at 534 | 535 | http://www.apache.org/licenses/LICENSE-2.0 536 | 537 | Unless required by applicable law or agreed to in writing, software 538 | distributed under the License is distributed on an "AS IS" BASIS, 539 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 540 | See the License for the specific language governing permissions and 541 | limitations under the License. 542 | 543 | ================================================================ 544 | 545 | github.com/go-quicktest/qt 546 | https://github.com/go-quicktest/qt 547 | ---------------------------------------------------------------- 548 | MIT License 549 | 550 | Copyright (c) 2017 Canonical Ltd. 551 | 552 | Permission is hereby granted, free of charge, to any person obtaining a copy 553 | of this software and associated documentation files (the "Software"), to deal 554 | in the Software without restriction, including without limitation the rights 555 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 556 | copies of the Software, and to permit persons to whom the Software is 557 | furnished to do so, subject to the following conditions: 558 | 559 | The above copyright notice and this permission notice shall be included in all 560 | copies or substantial portions of the Software. 561 | 562 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 563 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 564 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 565 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 566 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 567 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 568 | SOFTWARE. 569 | 570 | ================================================================ 571 | 572 | github.com/google/go-cmp 573 | https://github.com/google/go-cmp 574 | ---------------------------------------------------------------- 575 | Copyright (c) 2017 The Go Authors. All rights reserved. 576 | 577 | Redistribution and use in source and binary forms, with or without 578 | modification, are permitted provided that the following conditions are 579 | met: 580 | 581 | * Redistributions of source code must retain the above copyright 582 | notice, this list of conditions and the following disclaimer. 583 | * Redistributions in binary form must reproduce the above 584 | copyright notice, this list of conditions and the following disclaimer 585 | in the documentation and/or other materials provided with the 586 | distribution. 587 | * Neither the name of Google Inc. nor the names of its 588 | contributors may be used to endorse or promote products derived from 589 | this software without specific prior written permission. 590 | 591 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 592 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 593 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 594 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 595 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 596 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 597 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 598 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 599 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 600 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 601 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 602 | 603 | ================================================================ 604 | 605 | github.com/google/pprof 606 | https://github.com/google/pprof 607 | ---------------------------------------------------------------- 608 | 609 | Apache License 610 | Version 2.0, January 2004 611 | http://www.apache.org/licenses/ 612 | 613 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 614 | 615 | 1. Definitions. 616 | 617 | "License" shall mean the terms and conditions for use, reproduction, 618 | and distribution as defined by Sections 1 through 9 of this document. 619 | 620 | "Licensor" shall mean the copyright owner or entity authorized by 621 | the copyright owner that is granting the License. 622 | 623 | "Legal Entity" shall mean the union of the acting entity and all 624 | other entities that control, are controlled by, or are under common 625 | control with that entity. For the purposes of this definition, 626 | "control" means (i) the power, direct or indirect, to cause the 627 | direction or management of such entity, whether by contract or 628 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 629 | outstanding shares, or (iii) beneficial ownership of such entity. 630 | 631 | "You" (or "Your") shall mean an individual or Legal Entity 632 | exercising permissions granted by this License. 633 | 634 | "Source" form shall mean the preferred form for making modifications, 635 | including but not limited to software source code, documentation 636 | source, and configuration files. 637 | 638 | "Object" form shall mean any form resulting from mechanical 639 | transformation or translation of a Source form, including but 640 | not limited to compiled object code, generated documentation, 641 | and conversions to other media types. 642 | 643 | "Work" shall mean the work of authorship, whether in Source or 644 | Object form, made available under the License, as indicated by a 645 | copyright notice that is included in or attached to the work 646 | (an example is provided in the Appendix below). 647 | 648 | "Derivative Works" shall mean any work, whether in Source or Object 649 | form, that is based on (or derived from) the Work and for which the 650 | editorial revisions, annotations, elaborations, or other modifications 651 | represent, as a whole, an original work of authorship. For the purposes 652 | of this License, Derivative Works shall not include works that remain 653 | separable from, or merely link (or bind by name) to the interfaces of, 654 | the Work and Derivative Works thereof. 655 | 656 | "Contribution" shall mean any work of authorship, including 657 | the original version of the Work and any modifications or additions 658 | to that Work or Derivative Works thereof, that is intentionally 659 | submitted to Licensor for inclusion in the Work by the copyright owner 660 | or by an individual or Legal Entity authorized to submit on behalf of 661 | the copyright owner. For the purposes of this definition, "submitted" 662 | means any form of electronic, verbal, or written communication sent 663 | to the Licensor or its representatives, including but not limited to 664 | communication on electronic mailing lists, source code control systems, 665 | and issue tracking systems that are managed by, or on behalf of, the 666 | Licensor for the purpose of discussing and improving the Work, but 667 | excluding communication that is conspicuously marked or otherwise 668 | designated in writing by the copyright owner as "Not a Contribution." 669 | 670 | "Contributor" shall mean Licensor and any individual or Legal Entity 671 | on behalf of whom a Contribution has been received by Licensor and 672 | subsequently incorporated within the Work. 673 | 674 | 2. Grant of Copyright License. Subject to the terms and conditions of 675 | this License, each Contributor hereby grants to You a perpetual, 676 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 677 | copyright license to reproduce, prepare Derivative Works of, 678 | publicly display, publicly perform, sublicense, and distribute the 679 | Work and such Derivative Works in Source or Object form. 680 | 681 | 3. Grant of Patent License. Subject to the terms and conditions of 682 | this License, each Contributor hereby grants to You a perpetual, 683 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 684 | (except as stated in this section) patent license to make, have made, 685 | use, offer to sell, sell, import, and otherwise transfer the Work, 686 | where such license applies only to those patent claims licensable 687 | by such Contributor that are necessarily infringed by their 688 | Contribution(s) alone or by combination of their Contribution(s) 689 | with the Work to which such Contribution(s) was submitted. If You 690 | institute patent litigation against any entity (including a 691 | cross-claim or counterclaim in a lawsuit) alleging that the Work 692 | or a Contribution incorporated within the Work constitutes direct 693 | or contributory patent infringement, then any patent licenses 694 | granted to You under this License for that Work shall terminate 695 | as of the date such litigation is filed. 696 | 697 | 4. Redistribution. You may reproduce and distribute copies of the 698 | Work or Derivative Works thereof in any medium, with or without 699 | modifications, and in Source or Object form, provided that You 700 | meet the following conditions: 701 | 702 | (a) You must give any other recipients of the Work or 703 | Derivative Works a copy of this License; and 704 | 705 | (b) You must cause any modified files to carry prominent notices 706 | stating that You changed the files; and 707 | 708 | (c) You must retain, in the Source form of any Derivative Works 709 | that You distribute, all copyright, patent, trademark, and 710 | attribution notices from the Source form of the Work, 711 | excluding those notices that do not pertain to any part of 712 | the Derivative Works; and 713 | 714 | (d) If the Work includes a "NOTICE" text file as part of its 715 | distribution, then any Derivative Works that You distribute must 716 | include a readable copy of the attribution notices contained 717 | within such NOTICE file, excluding those notices that do not 718 | pertain to any part of the Derivative Works, in at least one 719 | of the following places: within a NOTICE text file distributed 720 | as part of the Derivative Works; within the Source form or 721 | documentation, if provided along with the Derivative Works; or, 722 | within a display generated by the Derivative Works, if and 723 | wherever such third-party notices normally appear. The contents 724 | of the NOTICE file are for informational purposes only and 725 | do not modify the License. You may add Your own attribution 726 | notices within Derivative Works that You distribute, alongside 727 | or as an addendum to the NOTICE text from the Work, provided 728 | that such additional attribution notices cannot be construed 729 | as modifying the License. 730 | 731 | You may add Your own copyright statement to Your modifications and 732 | may provide additional or different license terms and conditions 733 | for use, reproduction, or distribution of Your modifications, or 734 | for any such Derivative Works as a whole, provided Your use, 735 | reproduction, and distribution of the Work otherwise complies with 736 | the conditions stated in this License. 737 | 738 | 5. Submission of Contributions. Unless You explicitly state otherwise, 739 | any Contribution intentionally submitted for inclusion in the Work 740 | by You to the Licensor shall be under the terms and conditions of 741 | this License, without any additional terms or conditions. 742 | Notwithstanding the above, nothing herein shall supersede or modify 743 | the terms of any separate license agreement you may have executed 744 | with Licensor regarding such Contributions. 745 | 746 | 6. Trademarks. This License does not grant permission to use the trade 747 | names, trademarks, service marks, or product names of the Licensor, 748 | except as required for reasonable and customary use in describing the 749 | origin of the Work and reproducing the content of the NOTICE file. 750 | 751 | 7. Disclaimer of Warranty. Unless required by applicable law or 752 | agreed to in writing, Licensor provides the Work (and each 753 | Contributor provides its Contributions) on an "AS IS" BASIS, 754 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 755 | implied, including, without limitation, any warranties or conditions 756 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 757 | PARTICULAR PURPOSE. You are solely responsible for determining the 758 | appropriateness of using or redistributing the Work and assume any 759 | risks associated with Your exercise of permissions under this License. 760 | 761 | 8. Limitation of Liability. In no event and under no legal theory, 762 | whether in tort (including negligence), contract, or otherwise, 763 | unless required by applicable law (such as deliberate and grossly 764 | negligent acts) or agreed to in writing, shall any Contributor be 765 | liable to You for damages, including any direct, indirect, special, 766 | incidental, or consequential damages of any character arising as a 767 | result of this License or out of the use or inability to use the 768 | Work (including but not limited to damages for loss of goodwill, 769 | work stoppage, computer failure or malfunction, or any and all 770 | other commercial damages or losses), even if such Contributor 771 | has been advised of the possibility of such damages. 772 | 773 | 9. Accepting Warranty or Additional Liability. While redistributing 774 | the Work or Derivative Works thereof, You may choose to offer, 775 | and charge a fee for, acceptance of support, warranty, indemnity, 776 | or other liability obligations and/or rights consistent with this 777 | License. However, in accepting such obligations, You may act only 778 | on Your own behalf and on Your sole responsibility, not on behalf 779 | of any other Contributor, and only if You agree to indemnify, 780 | defend, and hold each Contributor harmless for any liability 781 | incurred by, or claims asserted against, such Contributor by reason 782 | of your accepting any such warranty or additional liability. 783 | 784 | END OF TERMS AND CONDITIONS 785 | 786 | APPENDIX: How to apply the Apache License to your work. 787 | 788 | To apply the Apache License to your work, attach the following 789 | boilerplate notice, with the fields enclosed by brackets "[]" 790 | replaced with your own identifying information. (Don't include 791 | the brackets!) The text should be enclosed in the appropriate 792 | comment syntax for the file format. We also recommend that a 793 | file or class name and description of purpose be included on the 794 | same "printed page" as the copyright notice for easier 795 | identification within third-party archives. 796 | 797 | Copyright [yyyy] [name of copyright owner] 798 | 799 | Licensed under the Apache License, Version 2.0 (the "License"); 800 | you may not use this file except in compliance with the License. 801 | You may obtain a copy of the License at 802 | 803 | http://www.apache.org/licenses/LICENSE-2.0 804 | 805 | Unless required by applicable law or agreed to in writing, software 806 | distributed under the License is distributed on an "AS IS" BASIS, 807 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 808 | See the License for the specific language governing permissions and 809 | limitations under the License. 810 | 811 | ================================================================ 812 | 813 | github.com/kr/pretty 814 | https://github.com/kr/pretty 815 | ---------------------------------------------------------------- 816 | Copyright 2012 Keith Rarick 817 | 818 | Permission is hereby granted, free of charge, to any person obtaining a copy 819 | of this software and associated documentation files (the "Software"), to deal 820 | in the Software without restriction, including without limitation the rights 821 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 822 | copies of the Software, and to permit persons to whom the Software is 823 | furnished to do so, subject to the following conditions: 824 | 825 | The above copyright notice and this permission notice shall be included in 826 | all copies or substantial portions of the Software. 827 | 828 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 829 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 830 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 831 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 832 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 833 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 834 | THE SOFTWARE. 835 | 836 | ================================================================ 837 | 838 | github.com/kr/text 839 | https://github.com/kr/text 840 | ---------------------------------------------------------------- 841 | Copyright 2012 Keith Rarick 842 | 843 | Permission is hereby granted, free of charge, to any person obtaining a copy 844 | of this software and associated documentation files (the "Software"), to deal 845 | in the Software without restriction, including without limitation the rights 846 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 847 | copies of the Software, and to permit persons to whom the Software is 848 | furnished to do so, subject to the following conditions: 849 | 850 | The above copyright notice and this permission notice shall be included in 851 | all copies or substantial portions of the Software. 852 | 853 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 854 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 855 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 856 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 857 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 858 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 859 | THE SOFTWARE. 860 | 861 | ================================================================ 862 | 863 | github.com/lucasb-eyer/go-colorful 864 | https://github.com/lucasb-eyer/go-colorful 865 | ---------------------------------------------------------------- 866 | Copyright (c) 2013 Lucas Beyer 867 | 868 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 869 | 870 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 871 | 872 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 873 | 874 | ================================================================ 875 | 876 | github.com/pkg/profile 877 | https://github.com/pkg/profile 878 | ---------------------------------------------------------------- 879 | Copyright (c) 2013 Dave Cheney. All rights reserved. 880 | 881 | Redistribution and use in source and binary forms, with or without 882 | modification, are permitted provided that the following conditions are 883 | met: 884 | 885 | * Redistributions of source code must retain the above copyright 886 | notice, this list of conditions and the following disclaimer. 887 | * Redistributions in binary form must reproduce the above 888 | copyright notice, this list of conditions and the following disclaimer 889 | in the documentation and/or other materials provided with the 890 | distribution. 891 | 892 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 893 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 894 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 895 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 896 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 897 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 898 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 899 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 900 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 901 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 902 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 903 | 904 | ================================================================ 905 | 906 | github.com/pmezard/go-difflib 907 | https://github.com/pmezard/go-difflib 908 | ---------------------------------------------------------------- 909 | Copyright (c) 2013, Patrick Mezard 910 | All rights reserved. 911 | 912 | Redistribution and use in source and binary forms, with or without 913 | modification, are permitted provided that the following conditions are 914 | met: 915 | 916 | Redistributions of source code must retain the above copyright 917 | notice, this list of conditions and the following disclaimer. 918 | Redistributions in binary form must reproduce the above copyright 919 | notice, this list of conditions and the following disclaimer in the 920 | documentation and/or other materials provided with the distribution. 921 | The names of its contributors may not be used to endorse or promote 922 | products derived from this software without specific prior written 923 | permission. 924 | 925 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 926 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 927 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 928 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 929 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 930 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 931 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 932 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 933 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 934 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 935 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 936 | 937 | ================================================================ 938 | 939 | github.com/rivo/tview 940 | https://github.com/rivo/tview 941 | ---------------------------------------------------------------- 942 | MIT License 943 | 944 | Copyright (c) 2018 Oliver Kuederle 945 | 946 | Permission is hereby granted, free of charge, to any person obtaining a copy 947 | of this software and associated documentation files (the "Software"), to deal 948 | in the Software without restriction, including without limitation the rights 949 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 950 | copies of the Software, and to permit persons to whom the Software is 951 | furnished to do so, subject to the following conditions: 952 | 953 | The above copyright notice and this permission notice shall be included in all 954 | copies or substantial portions of the Software. 955 | 956 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 957 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 958 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 959 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 960 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 961 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 962 | SOFTWARE. 963 | 964 | ================================================================ 965 | 966 | github.com/rivo/uniseg 967 | https://github.com/rivo/uniseg 968 | ---------------------------------------------------------------- 969 | MIT License 970 | 971 | Copyright (c) 2019 Oliver Kuederle 972 | 973 | Permission is hereby granted, free of charge, to any person obtaining a copy 974 | of this software and associated documentation files (the "Software"), to deal 975 | in the Software without restriction, including without limitation the rights 976 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 977 | copies of the Software, and to permit persons to whom the Software is 978 | furnished to do so, subject to the following conditions: 979 | 980 | The above copyright notice and this permission notice shall be included in all 981 | copies or substantial portions of the Software. 982 | 983 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 984 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 985 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 986 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 987 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 988 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 989 | SOFTWARE. 990 | 991 | ================================================================ 992 | 993 | github.com/rogpeppe/go-internal 994 | https://github.com/rogpeppe/go-internal 995 | ---------------------------------------------------------------- 996 | Copyright (c) 2018 The Go Authors. All rights reserved. 997 | 998 | Redistribution and use in source and binary forms, with or without 999 | modification, are permitted provided that the following conditions are 1000 | met: 1001 | 1002 | * Redistributions of source code must retain the above copyright 1003 | notice, this list of conditions and the following disclaimer. 1004 | * Redistributions in binary form must reproduce the above 1005 | copyright notice, this list of conditions and the following disclaimer 1006 | in the documentation and/or other materials provided with the 1007 | distribution. 1008 | * Neither the name of Google Inc. nor the names of its 1009 | contributors may be used to endorse or promote products derived from 1010 | this software without specific prior written permission. 1011 | 1012 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1013 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1014 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1015 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1016 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1017 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1018 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1019 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1020 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1021 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1022 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1023 | 1024 | ================================================================ 1025 | 1026 | github.com/stretchr/testify 1027 | https://github.com/stretchr/testify 1028 | ---------------------------------------------------------------- 1029 | MIT License 1030 | 1031 | Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors. 1032 | 1033 | Permission is hereby granted, free of charge, to any person obtaining a copy 1034 | of this software and associated documentation files (the "Software"), to deal 1035 | in the Software without restriction, including without limitation the rights 1036 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 1037 | copies of the Software, and to permit persons to whom the Software is 1038 | furnished to do so, subject to the following conditions: 1039 | 1040 | The above copyright notice and this permission notice shall be included in all 1041 | copies or substantial portions of the Software. 1042 | 1043 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1044 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1045 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1046 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1047 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1048 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 1049 | SOFTWARE. 1050 | 1051 | ================================================================ 1052 | 1053 | golang.org/x/sys 1054 | https://golang.org/x/sys 1055 | ---------------------------------------------------------------- 1056 | Copyright 2009 The Go Authors. 1057 | 1058 | Redistribution and use in source and binary forms, with or without 1059 | modification, are permitted provided that the following conditions are 1060 | met: 1061 | 1062 | * Redistributions of source code must retain the above copyright 1063 | notice, this list of conditions and the following disclaimer. 1064 | * Redistributions in binary form must reproduce the above 1065 | copyright notice, this list of conditions and the following disclaimer 1066 | in the documentation and/or other materials provided with the 1067 | distribution. 1068 | * Neither the name of Google LLC nor the names of its 1069 | contributors may be used to endorse or promote products derived from 1070 | this software without specific prior written permission. 1071 | 1072 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1073 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1074 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1075 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1076 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1077 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1078 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1079 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1080 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1081 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1082 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1083 | 1084 | ================================================================ 1085 | 1086 | golang.org/x/term 1087 | https://golang.org/x/term 1088 | ---------------------------------------------------------------- 1089 | Copyright 2009 The Go Authors. 1090 | 1091 | Redistribution and use in source and binary forms, with or without 1092 | modification, are permitted provided that the following conditions are 1093 | met: 1094 | 1095 | * Redistributions of source code must retain the above copyright 1096 | notice, this list of conditions and the following disclaimer. 1097 | * Redistributions in binary form must reproduce the above 1098 | copyright notice, this list of conditions and the following disclaimer 1099 | in the documentation and/or other materials provided with the 1100 | distribution. 1101 | * Neither the name of Google LLC nor the names of its 1102 | contributors may be used to endorse or promote products derived from 1103 | this software without specific prior written permission. 1104 | 1105 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1106 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1107 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1108 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1109 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1110 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1111 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1112 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1113 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1114 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1115 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1116 | 1117 | ================================================================ 1118 | 1119 | golang.org/x/text 1120 | https://golang.org/x/text 1121 | ---------------------------------------------------------------- 1122 | Copyright 2009 The Go Authors. 1123 | 1124 | Redistribution and use in source and binary forms, with or without 1125 | modification, are permitted provided that the following conditions are 1126 | met: 1127 | 1128 | * Redistributions of source code must retain the above copyright 1129 | notice, this list of conditions and the following disclaimer. 1130 | * Redistributions in binary form must reproduce the above 1131 | copyright notice, this list of conditions and the following disclaimer 1132 | in the documentation and/or other materials provided with the 1133 | distribution. 1134 | * Neither the name of Google LLC nor the names of its 1135 | contributors may be used to endorse or promote products derived from 1136 | this software without specific prior written permission. 1137 | 1138 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1139 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1140 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1141 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1142 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1143 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1144 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1145 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1146 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1147 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1148 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1149 | 1150 | ================================================================ 1151 | 1152 | gopkg.in/yaml.v3 1153 | https://gopkg.in/yaml.v3 1154 | ---------------------------------------------------------------- 1155 | 1156 | This project is covered by two different licenses: MIT and Apache. 1157 | 1158 | #### MIT License #### 1159 | 1160 | The following files were ported to Go from C files of libyaml, and thus 1161 | are still covered by their original MIT license, with the additional 1162 | copyright staring in 2011 when the project was ported over: 1163 | 1164 | apic.go emitterc.go parserc.go readerc.go scannerc.go 1165 | writerc.go yamlh.go yamlprivateh.go 1166 | 1167 | Copyright (c) 2006-2010 Kirill Simonov 1168 | Copyright (c) 2006-2011 Kirill Simonov 1169 | 1170 | Permission is hereby granted, free of charge, to any person obtaining a copy of 1171 | this software and associated documentation files (the "Software"), to deal in 1172 | the Software without restriction, including without limitation the rights to 1173 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 1174 | of the Software, and to permit persons to whom the Software is furnished to do 1175 | so, subject to the following conditions: 1176 | 1177 | The above copyright notice and this permission notice shall be included in all 1178 | copies or substantial portions of the Software. 1179 | 1180 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1181 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1182 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1183 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1184 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1185 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 1186 | SOFTWARE. 1187 | 1188 | ### Apache License ### 1189 | 1190 | All the remaining project files are covered by the Apache license: 1191 | 1192 | Copyright (c) 2011-2019 Canonical Ltd 1193 | 1194 | Licensed under the Apache License, Version 2.0 (the "License"); 1195 | you may not use this file except in compliance with the License. 1196 | You may obtain a copy of the License at 1197 | 1198 | http://www.apache.org/licenses/LICENSE-2.0 1199 | 1200 | Unless required by applicable law or agreed to in writing, software 1201 | distributed under the License is distributed on an "AS IS" BASIS, 1202 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1203 | See the License for the specific language governing permissions and 1204 | limitations under the License. 1205 | 1206 | ================================================================ 1207 | 1208 | mvdan.cc/sh/v3 1209 | https://mvdan.cc/sh/v3 1210 | ---------------------------------------------------------------- 1211 | Copyright (c) 2016, Daniel Martí. All rights reserved. 1212 | 1213 | Redistribution and use in source and binary forms, with or without 1214 | modification, are permitted provided that the following conditions are 1215 | met: 1216 | 1217 | * Redistributions of source code must retain the above copyright 1218 | notice, this list of conditions and the following disclaimer. 1219 | * Redistributions in binary form must reproduce the above 1220 | copyright notice, this list of conditions and the following disclaimer 1221 | in the documentation and/or other materials provided with the 1222 | distribution. 1223 | * Neither the name of the copyright holder nor the names of its 1224 | contributors may be used to endorse or promote products derived from 1225 | this software without specific prior written permission. 1226 | 1227 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1228 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1229 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1230 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1231 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1232 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1233 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1234 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1235 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1236 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1237 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1238 | 1239 | ================================================================ 1240 | 1241 | --------------------------------------------------------------------------------