diff --git a/go.mod b/go.mod index c023ec97a5..e611fa6c45 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/tektoncd/cli go 1.26.5 require ( - github.com/ActiveState/vt10x v1.3.1 github.com/AlecAivazis/survey/v2 v2.3.7 github.com/Masterminds/semver/v3 v3.5.0 github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 @@ -118,7 +117,6 @@ require ( github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/kelseyhightower/envconfig v1.4.0 // indirect github.com/klauspost/compress v1.18.6 // indirect - github.com/kr/pty v1.1.1 // indirect github.com/ktr0731/go-ansisgr v0.1.0 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect github.com/lucasb-eyer/go-colorful v1.4.0 // indirect diff --git a/go.sum b/go.sum index a438260b53..42a8d8c381 100644 --- a/go.sum +++ b/go.sum @@ -22,8 +22,6 @@ fortio.org/safecast v1.2.0 h1:ckQJNenMJHycqPsi/QrzA4EUX5WQkyd+hGO4mxt/a8w= fortio.org/safecast v1.2.0/go.mod h1:xZmcPk3vi4kuUFf+tq4SvnlVdwViqf6ZSZl91Jr9Jdg= github.com/42wim/httpsig v1.2.3 h1:xb0YyWhkYj57SPtfSttIobJUPJZB9as1nsfo7KWVcEs= github.com/42wim/httpsig v1.2.3/go.mod h1:nZq9OlYKDrUBhptd77IHx4/sZZD+IxTBADvAPI9G/EM= -github.com/ActiveState/vt10x v1.3.1 h1:7qi8BGXUEBghzBxfXSY0J77etO+L95PZQlwD7ay2mn0= -github.com/ActiveState/vt10x v1.3.1/go.mod h1:8wJKd36c9NmCfGyPyOJmkvyIMvbUPfHkfdS8zZlK19s= github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ= github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo= github.com/Azure/azure-sdk-for-go v67.0.0+incompatible h1:SVBwznSETB0Sipd0uyGJr7khLhJOFRUEUb+0JgkCvDo= @@ -48,15 +46,12 @@ github.com/Masterminds/semver/v3 v3.5.0 h1:kQceYJfbupGfZOKZQg0kou0DgAKhzDg2NZPAw github.com/Masterminds/semver/v3 v3.5.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= github.com/allegro/bigcache/v3 v3.1.0 h1:H2Vp8VOvxcrB91o86fUSVJFqeuz8kpyyB02eH3bSzwk= github.com/allegro/bigcache/v3 v3.1.0/go.mod h1:aPyh7jEvrog9zAwx5N7+JUQX5dZTSGpxF1LAR4dr35I= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/autarch/testify v1.2.2 h1:9Q9V6zqhP7R6dv+zRUddv6kXKLo6ecQhnFRFWM71i1c= -github.com/autarch/testify v1.2.2/go.mod h1:oDbHKfFv2/D5UtVrxkk90OKcb6P4/AqF1Pcf6ZbvDQo= github.com/aws/aws-sdk-go-v2 v1.41.7 h1:DWpAJt66FmnnaRIOT/8ASTucrvuDPZASqhhLey6tLY8= github.com/aws/aws-sdk-go-v2 v1.41.7/go.mod h1:4LAfZOPHNVNQEckOACQx60Y8pSRjIkNZQz1w92xpMJc= github.com/aws/aws-sdk-go-v2/config v1.32.17 h1:FpL4/758/diKwqbytU0prpuiu60fgXKUWCpDJtApclU= @@ -152,10 +147,8 @@ github.com/fxamacker/cbor/v2 v2.9.1 h1:2rWm8B193Ll4VdjsJY28jxs70IdDsHRWgQYAI80+r github.com/fxamacker/cbor/v2 v2.9.1/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/gaganhr94/docker-credential-acr v1.0.2 h1:0eMFjVqRUmwINbhFxb5xLTWLJpdNta34TGuInVGtEGk= github.com/gaganhr94/docker-credential-acr v1.0.2/go.mod h1:8yd2V0GhCyd17MpMxfAJzcZqldu1ghFmrUV0GS7qcGc= -github.com/gdamore/encoding v0.0.0-20151215212835-b23993cbb635/go.mod h1:yrQYJKKDTrHmbYxI7CYi+/hbdiDT2m4Hj+t0ikCjsrQ= github.com/gdamore/encoding v1.0.1 h1:YzKZckdBL6jVt2Gc+5p82qhrGiqMdG/eNs6Wy0u3Uhw= github.com/gdamore/encoding v1.0.1/go.mod h1:0Z0cMFinngz9kS1QfMjCP8TY7em3bZYeeklsSDPivEo= -github.com/gdamore/tcell v1.0.1-0.20180608172421-b3cebc399d6f/go.mod h1:tqyG50u7+Ctv1w5VX67kLzKcj9YXR/JSBZQq/+mLl1A= github.com/gdamore/tcell/v2 v2.9.0 h1:N6t+eqK7/xwtRPwxzs1PXeRWnm0H9l02CrgJ7DLn1ys= github.com/gdamore/tcell/v2 v2.9.0/go.mod h1:8/ZoqM9rxzYphT9tH/9LnunhV9oPBqwS8WHGYm5nrmo= github.com/go-chi/chi/v5 v5.3.0 h1:halUjDxhshgXHMrao5bB8eNBXo/rnzwr8m5m36glehM= @@ -260,7 +253,6 @@ github.com/googleapis/enterprise-certificate-proxy v0.3.15 h1:xolVQTEXusUcAA5Ugt github.com/googleapis/enterprise-certificate-proxy v0.3.15/go.mod h1:vqVt9yG9480NtzREnTlmGSBmFrA+bzb0yl0TxoBQXOg= github.com/googleapis/gax-go/v2 v2.22.0 h1:PjIWBpgGIVKGoCXuiCoP64altEJCj3/Ei+kSU5vlZD4= github.com/googleapis/gax-go/v2 v2.22.0/go.mod h1:irWBbALSr0Sk3qlqb9SyJ1h68WjgeFuiOzI4Rqw5+aY= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 h1:HWRh5R2+9EifMyIHV7ZV+MIZqgz+PMpZ14Jynv3O2Zs= @@ -293,7 +285,6 @@ github.com/hashicorp/hcl v1.0.1-vault-7 h1:ag5OxFVy3QYTFTJODRzTKVZ6xvdfLLCA1cy/Y github.com/hashicorp/hcl v1.0.1-vault-7/go.mod h1:XYhtn6ijBSAj6n4YqAaf7RBPS4I06AItNorpy+MoQNM= github.com/hashicorp/vault/api v1.23.0 h1:gXgluBsSECfRWTSW9niY2jwg2e9mMJc4WoHNv4g3h6A= github.com/hashicorp/vault/api v1.23.0/go.mod h1:zransKiB9ftp+kgY8ydjnvCU7Wk8i9L0DYWpXeMj9ko= -github.com/hinshun/vt10x v0.0.0-20180809195222-d55458df857c/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/hinshun/vt10x v0.0.0-20220228203356-1ab2cad5fd82 h1:uf1FmugJNeFovjWtxD7FSPWQXdi0KuKnZfvN4CFUAtA= github.com/hinshun/vt10x v0.0.0-20220228203356-1ab2cad5fd82/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= @@ -313,7 +304,6 @@ github.com/jonboulle/clockwork v0.5.0 h1:Hyh9A8u51kptdkR+cqRpT1EebBwTn1oK9YfGYbd github.com/jonboulle/clockwork v0.5.0/go.mod h1:3mZlmanh0g2NDKO5TWZVJAfofYk64M7XN3SzBPjZF60= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= @@ -323,7 +313,6 @@ github.com/klauspost/compress v1.18.6/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -338,7 +327,6 @@ github.com/letsencrypt/boulder v0.20260720.0 h1:qfEk/Wc6CQfmIGCc7PCqrn0iRfUO+eKI github.com/letsencrypt/boulder v0.20260720.0/go.mod h1:mNAmDl6+4CQnDk4+Mso2UJau2phT0L5UkBIS48FjmG0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= -github.com/lucasb-eyer/go-colorful v0.0.0-20180526135729-345fbb3dbcdb/go.mod h1:NXg0ArsFk0Y01623LgUqoqcouGDB+PwCCQlrwrG6xJ4= github.com/lucasb-eyer/go-colorful v1.4.0 h1:UtrWVfLdarDgc44HcS7pYloGHJUjHV/4FwW4TvVgFr4= github.com/lucasb-eyer/go-colorful v1.4.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -347,7 +335,6 @@ github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stg github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.21 h1:xYae+lCNBP7QuW4PUnNG61ffM4hVIfm+zUzDuSzYLGs= github.com/mattn/go-isatty v0.0.21/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.22 h1:76lXsPn6FyHtTY+jt2fTTvsMUCZq1k0qwRsAMuxzKAk= github.com/mattn/go-runewidth v0.0.22/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= @@ -441,8 +428,6 @@ github.com/sigstore/sigstore/pkg/signature/kms/hashivault v1.10.8 h1:1DGe4/clcdO github.com/sigstore/sigstore/pkg/signature/kms/hashivault v1.10.8/go.mod h1:6IDFhpgxtzqbnzrFkyegbj7RfWwKeRrb3/+xAD1Wp+Y= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= @@ -461,7 +446,6 @@ github.com/spiffe/spire-api-sdk v1.15.1/go.mod h1:9hXJcMzatM1KwAtBDO3s6HccDCic++ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -612,7 +596,6 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= @@ -656,7 +639,6 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af h1:+5/Sw3GsDNlEmu7TfklWKPdQ0Ykja5VEmq2i817+jbI= google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= -gopkg.in/DATA-DOG/go-sqlmock.v1 v1.3.0/go.mod h1:OdE7CF6DbADk7lN8LIKRzRJTTZXIjtWgA5THM5lhBAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/pkg/cmd/hub/test/prompt/prompt.go b/pkg/cmd/hub/test/prompt/prompt.go index 688a51f2b0..e4218f744a 100644 --- a/pkg/cmd/hub/test/prompt/prompt.go +++ b/pkg/cmd/hub/test/prompt/prompt.go @@ -18,10 +18,10 @@ import ( "bytes" "testing" - "github.com/ActiveState/vt10x" "github.com/AlecAivazis/survey/v2" "github.com/AlecAivazis/survey/v2/terminal" goexpect "github.com/Netflix/go-expect" + "github.com/tektoncd/cli/test/helper" "gotest.tools/v3/assert" ) @@ -36,7 +36,7 @@ type Prompt struct { func (pt *Prompt) RunTest(t *testing.T, procedure func(*goexpect.Console) error, test func(terminal.Stdio) error) { // Multiplex output to a buffer as well for the raw bytes. buf := new(bytes.Buffer) - c, state, err := vt10x.NewVT10XConsole(goexpect.WithStdout(buf)) + c, state, err := helper.NewVT10XConsole(goexpect.WithStdout(buf)) assert.NilError(t, err) defer c.Close() diff --git a/vendor/github.com/ActiveState/vt10x/.travis.yml b/vendor/github.com/ActiveState/vt10x/.travis.yml deleted file mode 100644 index 8c2998f7db..0000000000 --- a/vendor/github.com/ActiveState/vt10x/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: go - -go: - - "1.10.2" - - master diff --git a/vendor/github.com/ActiveState/vt10x/LICENSE b/vendor/github.com/ActiveState/vt10x/LICENSE deleted file mode 100644 index a5976d65d3..0000000000 --- a/vendor/github.com/ActiveState/vt10x/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2013 James Gray - -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 liitation 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: - -The above copyright notice and thismssion notice shall be included in all -copies or substantial portions of the Software. - -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. diff --git a/vendor/github.com/ActiveState/vt10x/README.md b/vendor/github.com/ActiveState/vt10x/README.md deleted file mode 100644 index 420318f675..0000000000 --- a/vendor/github.com/ActiveState/vt10x/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# vt10x - -[![Build Status](https://travis-ci.org/hinshun/vt10x.svg?branch=master)](https://travis-ci.org/hinshun/vt10x) -[![GoDoc](https://godoc.org/github.com/hinshun/vt10x?status.svg)](https://godoc.org/github.com/hinshun/vt10x) - -Package vt10x is a vt10x terminal emulation backend, influenced -largely by st, rxvt, xterm, and iTerm as reference. Use it for terminal -muxing, a terminal emulation frontend, or wherever else you need -terminal emulation. diff --git a/vendor/github.com/ActiveState/vt10x/color.go b/vendor/github.com/ActiveState/vt10x/color.go deleted file mode 100644 index 4ce0d8f323..0000000000 --- a/vendor/github.com/ActiveState/vt10x/color.go +++ /dev/null @@ -1,37 +0,0 @@ -package vt10x - -// ANSI color values -const ( - Black Color = iota - Red - Green - Yellow - Blue - Magenta - Cyan - LightGrey - DarkGrey - LightRed - LightGreen - LightYellow - LightBlue - LightMagenta - LightCyan - White -) - -// Default colors are potentially distinct to allow for special behavior. -// For example, a transparent background. Otherwise, the simple case is to -// map default colors to another color. -const ( - DefaultFG Color = 0xff80 + iota - DefaultBG -) - -// Color maps to the ANSI colors [0, 16) and the xterm colors [16, 256). -type Color uint16 - -// ANSI returns true if Color is within [0, 16). -func (c Color) ANSI() bool { - return (c < 16) -} diff --git a/vendor/github.com/ActiveState/vt10x/csi.go b/vendor/github.com/ActiveState/vt10x/csi.go deleted file mode 100644 index 138cff9078..0000000000 --- a/vendor/github.com/ActiveState/vt10x/csi.go +++ /dev/null @@ -1,189 +0,0 @@ -package vt10x - -import ( - "fmt" - "strconv" - "strings" -) - -// CSI (Control Sequence Introducer) -// ESC+[ -type csiEscape struct { - buf []byte - args []int - mode byte - priv bool -} - -func (c *csiEscape) reset() { - c.buf = c.buf[:0] - c.args = c.args[:0] - c.mode = 0 - c.priv = false -} - -func (c *csiEscape) put(b byte) bool { - c.buf = append(c.buf, b) - if b >= 0x40 && b <= 0x7E || len(c.buf) >= 256 { - c.parse() - return true - } - return false -} - -func (c *csiEscape) parse() { - c.mode = c.buf[len(c.buf)-1] - if len(c.buf) == 1 { - return - } - s := string(c.buf) - c.args = c.args[:0] - if s[0] == '?' { - c.priv = true - s = s[1:] - } - s = s[:len(s)-1] - ss := strings.Split(s, ";") - for _, p := range ss { - i, err := strconv.Atoi(p) - if err != nil { - //t.logf("invalid CSI arg '%s'\n", p) - break - } - c.args = append(c.args, i) - } -} - -func (c *csiEscape) arg(i, def int) int { - if i >= len(c.args) || i < 0 { - return def - } - return c.args[i] -} - -// maxarg takes the maximum of arg(i, def) and def -func (c *csiEscape) maxarg(i, def int) int { - return max(c.arg(i, def), def) -} - -func (t *State) handleCSI() { - c := &t.csi - switch c.mode { - default: - goto unknown - case '@': // ICH - insert blank char - t.insertBlanks(c.arg(0, 1)) - case 'A': // CUU - cursor up - t.moveTo(t.cur.x, t.cur.y-c.maxarg(0, 1)) - case 'B', 'e': // CUD, VPR - cursor down - t.moveTo(t.cur.x, t.cur.y+c.maxarg(0, 1)) - case 'c': // DA - device attributes - if c.arg(0, 0) == 0 { - // TODO: write vt102 id - } - case 'C', 'a': // CUF, HPR - cursor forward - t.moveTo(t.cur.x+c.maxarg(0, 1), t.cur.y) - case 'D': // CUB - cursor backward - t.moveTo(t.cur.x-c.maxarg(0, 1), t.cur.y) - case 'E': // CNL - cursor down and first col - t.moveTo(0, t.cur.y+c.arg(0, 1)) - case 'F': // CPL - cursor up and first col - t.moveTo(0, t.cur.y-c.arg(0, 1)) - case 'g': // TBC - tabulation clear - switch c.arg(0, 0) { - // clear current tab stop - case 0: - t.tabs[t.cur.x] = false - // clear all tabs - case 3: - for i := range t.tabs { - t.tabs[i] = false - } - default: - goto unknown - } - case 'G', '`': // CHA, HPA - Move to - t.moveTo(c.arg(0, 1)-1, t.cur.y) - case 'H', 'f': // CUP, HVP - move to - t.moveAbsTo(c.arg(1, 1)-1, c.arg(0, 1)-1) - case 'I': // CHT - cursor forward tabulation tab stops - n := c.arg(0, 1) - for i := 0; i < n; i++ { - t.putTab(true) - } - case 'J': // ED - clear screen - // TODO: sel.ob.x = -1 - switch c.arg(0, 0) { - case 0: // below - t.clear(t.cur.x, t.cur.y, t.cols-1, t.cur.y) - if t.cur.y < t.rows-1 { - t.clear(0, t.cur.y+1, t.cols-1, t.rows-1) - } - case 1: // above - if t.cur.y > 1 { - t.clear(0, 0, t.cols-1, t.cur.y-1) - } - t.clear(0, t.cur.y, t.cur.x, t.cur.y) - case 2: // all - t.clear(0, 0, t.cols-1, t.rows-1) - default: - goto unknown - } - case 'K': // EL - clear line - switch c.arg(0, 0) { - case 0: // right - t.clear(t.cur.x, t.cur.y, t.cols-1, t.cur.y) - case 1: // left - t.clear(0, t.cur.y, t.cur.x, t.cur.y) - case 2: // all - t.clear(0, t.cur.y, t.cols-1, t.cur.y) - } - case 'S': // SU - scroll lines up - t.scrollUp(t.top, c.arg(0, 1)) - case 'T': // SD - scroll lines down - t.scrollDown(t.top, c.arg(0, 1)) - case 'L': // IL - insert blank lines - t.insertBlankLines(c.arg(0, 1)) - case 'l': // RM - reset mode - t.setMode(c.priv, false, c.args) - case 'M': // DL - delete lines - t.deleteLines(c.arg(0, 1)) - case 'X': // ECH - erase chars - t.clear(t.cur.x, t.cur.y, t.cur.x+c.arg(0, 1)-1, t.cur.y) - case 'P': // DCH - delete chars - t.deleteChars(c.arg(0, 1)) - case 'Z': // CBT - cursor backward tabulation tab stops - n := c.arg(0, 1) - for i := 0; i < n; i++ { - t.putTab(false) - } - case 'd': // VPA - move to - t.moveAbsTo(t.cur.x, c.arg(0, 1)-1) - case 'h': // SM - set terminal mode - t.setMode(c.priv, true, c.args) - case 'm': // SGR - terminal attribute (color) - t.setAttr(c.args) - case 'n': - switch c.arg(0, 0) { - case 5: // DSR - device status report - t.w.Write([]byte("\033[0n")) - case 6: // CPR - cursor position report - t.w.Write([]byte(fmt.Sprintf("\033[%d;%dR", t.cur.y+1, t.cur.x+1))) - } - case 'r': // DECSTBM - set scrolling region - if c.priv { - goto unknown - } else { - t.setScroll(c.arg(0, 1)-1, c.arg(1, t.rows)-1) - t.moveAbsTo(0, 0) - } - case 's': // DECSC - save cursor position (ANSI.SYS) - t.saveCursor() - case 'u': // DECRC - restore cursor position (ANSI.SYS) - t.restoreCursor() - } - return -unknown: // TODO: get rid of this goto - t.logf("unknown CSI sequence '%c'\n", c.mode) - // TODO: c.dump() -} diff --git a/vendor/github.com/ActiveState/vt10x/doc.go b/vendor/github.com/ActiveState/vt10x/doc.go deleted file mode 100644 index 8205207d6e..0000000000 --- a/vendor/github.com/ActiveState/vt10x/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -/* -Package terminal is a vt10x terminal emulation backend, influenced -largely by st, rxvt, xterm, and iTerm as reference. Use it for terminal -muxing, a terminal emulation frontend, or wherever else you need -terminal emulation. - -In development, but very usable. -*/ -package vt10x diff --git a/vendor/github.com/ActiveState/vt10x/expect.go b/vendor/github.com/ActiveState/vt10x/expect.go deleted file mode 100644 index 7ae52f321e..0000000000 --- a/vendor/github.com/ActiveState/vt10x/expect.go +++ /dev/null @@ -1,31 +0,0 @@ -// +build !windows - -package vt10x - -import ( - expect "github.com/Netflix/go-expect" - "github.com/kr/pty" -) - -// NewVT10XConsole returns a new expect.Console that multiplexes the -// Stdin/Stdout to a VT10X terminal, allowing Console to interact with an -// application sending ANSI escape sequences. -func NewVT10XConsole(opts ...expect.ConsoleOpt) (*expect.Console, *State, error) { - ptm, pts, err := pty.Open() - if err != nil { - return nil, nil, err - } - - var state State - term, err := Create(&state, pts) - if err != nil { - return nil, nil, err - } - - c, err := expect.NewConsole(append(opts, expect.WithStdin(ptm), expect.WithStdout(term), expect.WithCloser(pts, ptm, term))...) - if err != nil { - return nil, nil, err - } - - return c, &state, nil -} diff --git a/vendor/github.com/ActiveState/vt10x/ioctl_other.go b/vendor/github.com/ActiveState/vt10x/ioctl_other.go deleted file mode 100644 index 0aa1868754..0000000000 --- a/vendor/github.com/ActiveState/vt10x/ioctl_other.go +++ /dev/null @@ -1,15 +0,0 @@ -// +build plan9 nacl windows - -package vt10x - -import ( - "os" -) - -func ioctl(f *os.File, cmd, p uintptr) error { - return nil -} - -func ResizePty(*os.File) error { - return nil -} diff --git a/vendor/github.com/ActiveState/vt10x/ioctl_posix.go b/vendor/github.com/ActiveState/vt10x/ioctl_posix.go deleted file mode 100644 index 7b81b3a1c2..0000000000 --- a/vendor/github.com/ActiveState/vt10x/ioctl_posix.go +++ /dev/null @@ -1,31 +0,0 @@ -// +build linux darwin dragonfly solaris openbsd netbsd freebsd - -package vt10x - -import ( - "os" - "syscall" - "unsafe" -) - -func ioctl(f *os.File, cmd, p uintptr) error { - _, _, errno := syscall.Syscall( - syscall.SYS_IOCTL, - f.Fd(), - syscall.TIOCSWINSZ, - p) - if errno != 0 { - return syscall.Errno(errno) - } - return nil -} - -func ResizePty(pty *os.File, cols, rows int) error { - var w struct{ row, col, xpix, ypix uint16 } - w.row = uint16(rows) - w.col = uint16(cols) - w.xpix = 16 * uint16(cols) - w.ypix = 16 * uint16(rows) - return ioctl(pty, syscall.TIOCSWINSZ, - uintptr(unsafe.Pointer(&w))) -} diff --git a/vendor/github.com/ActiveState/vt10x/parse.go b/vendor/github.com/ActiveState/vt10x/parse.go deleted file mode 100644 index b6eee4847a..0000000000 --- a/vendor/github.com/ActiveState/vt10x/parse.go +++ /dev/null @@ -1,222 +0,0 @@ -package vt10x - -func isControlCode(c rune) bool { - return c < 0x20 || c == 0177 -} - -func (t *State) parse(c rune) bool { - t.logf("%q", string(c)) - if isControlCode(c) { - wasHandled, isPrintable := t.handleControlCodes(c) - if wasHandled || t.cur.attr.mode&attrGfx == 0 { - return isPrintable - } - } - // TODO: update selection; see st.c:2450 - - if t.mode&ModeWrap != 0 && t.cur.state&cursorWrapNext != 0 { - t.lines[t.cur.y][t.cur.x].mode |= attrWrap - t.newline(true) - } - - if t.mode&ModeInsert != 0 && t.cur.x+1 < t.cols { - // TODO: move shiz, look at st.c:2458 - t.logln("insert mode not implemented") - } - - t.setChar(c, &t.cur.attr, t.cur.x, t.cur.y) - if t.cur.x+1 < t.cols { - t.moveTo(t.cur.x+1, t.cur.y) - } else { - t.cur.state |= cursorWrapNext - } - - return true -} - -func (t *State) parseEsc(c rune) bool { - if wasHandled, isPrintable := t.handleControlCodes(c); wasHandled { - return isPrintable - } - next := t.parse - t.logf("%q", string(c)) - switch c { - case '[': - next = t.parseEscCSI - case '#': - next = t.parseEscTest - case 'P', // DCS - Device Control String - '_', // APC - Application Program Command - '^', // PM - Privacy Message - ']', // OSC - Operating System Command - 'k': // old title set compatibility - t.str.reset() - t.str.typ = c - next = t.parseEscStr - case '(': // set primary charset G0 - next = t.parseEscAltCharset - case ')', // set secondary charset G1 (ignored) - '*', // set tertiary charset G2 (ignored) - '+': // set quaternary charset G3 (ignored) - case 'D': // IND - linefeed - if t.cur.y == t.bottom { - t.scrollUp(t.top, 1) - } else { - t.moveTo(t.cur.x, t.cur.y+1) - } - case 'E': // NEL - next line - t.newline(true) - case 'H': // HTS - horizontal tab stop - t.tabs[t.cur.x] = true - case 'M': // RI - reverse index - if t.cur.y == t.top { - t.scrollDown(t.top, 1) - } else { - t.moveTo(t.cur.x, t.cur.y-1) - } - case 'Z': // DECID - identify terminal - // TODO: write to our writer our id - case 'c': // RIS - reset to initial state - t.reset() - case '=': // DECPAM - application keypad - t.mode |= ModeAppKeypad - case '>': // DECPNM - normal keypad - t.mode &^= ModeAppKeypad - case '7': // DECSC - save cursor - t.saveCursor() - case '8': // DECRC - restore cursor - t.restoreCursor() - case '\\': // ST - stop - default: - t.logf("unknown ESC sequence '%c'\n", c) - } - t.state = next - return false -} - -func (t *State) parseEscCSI(c rune) bool { - if wasHandled, isPrintable := t.handleControlCodes(c); wasHandled { - return isPrintable - } - t.logf("%q", string(c)) - if t.csi.put(byte(c)) { - t.state = t.parse - t.handleCSI() - } - return false -} - -func (t *State) parseEscStr(c rune) bool { - t.logf("%q", string(c)) - switch c { - case '\033': - t.state = t.parseEscStrEnd - case '\a': // backwards compatiblity to xterm - t.state = t.parse - t.handleSTR() - default: - t.str.put(c) - } - return false -} - -func (t *State) parseEscStrEnd(c rune) bool { - if wasHandled, isPrintable := t.handleControlCodes(c); wasHandled { - return isPrintable - } - t.logf("%q", string(c)) - t.state = t.parse - if c == '\\' { - t.handleSTR() - } - return false -} - -func (t *State) parseEscAltCharset(c rune) bool { - if wasHandled, isPrintable := t.handleControlCodes(c); wasHandled { - return isPrintable - } - t.logf("%q", string(c)) - switch c { - case '0': // line drawing set - t.cur.attr.mode |= attrGfx - case 'B': // USASCII - t.cur.attr.mode &^= attrGfx - case 'A', // UK (ignored) - '<', // multinational (ignored) - '5', // Finnish (ignored) - 'C', // Finnish (ignored) - 'K': // German (ignored) - default: - t.logf("unknown alt. charset '%c'\n", c) - } - t.state = t.parse - return false -} - -func (t *State) parseEscTest(c rune) bool { - if wasHandled, isPrintable := t.handleControlCodes(c); wasHandled { - return isPrintable - } - // DEC screen alignment test - if c == '8' { - for y := 0; y < t.rows; y++ { - for x := 0; x < t.cols; x++ { - t.setChar('E', &t.cur.attr, x, y) - } - } - } - t.state = t.parse - return false -} - -// handleControlCodes handles control codes and returns two booleans -// The first boolean indicates whether the control code was handled, the second one whether -// the rune was printable -func (t *State) handleControlCodes(c rune) (bool, bool) { - if !isControlCode(c) { - return false, true - } - isPrintable := false - switch c { - // HT - case '\t': - t.putTab(true) - isPrintable = true - // BS - case '\b': - if t.cur.x == t.cols-1 && t.Mode(ModeWrap) && t.cur.state&cursorWrapNext != 0 { - t.cur.state &^= cursorWrapNext - } else { - t.moveTo(t.cur.x-1, t.cur.y) - } - // CR - case '\r': - t.moveTo(0, t.cur.y) - // LF, VT, LF - case '\f', '\v', '\n': - // go to first col if mode is set - t.newline(t.mode&ModeCRLF != 0) - isPrintable = true - // BEL - case '\a': - // TODO: emit sound - // TODO: window alert if not focused - // ESC - case 033: - t.csi.reset() - t.state = t.parseEsc - // SO, SI - case 016, 017: - // different charsets not supported. apps should use the correct - // alt charset escapes, probably for line drawing - // SUB, CAN - case 032, 030: - t.csi.reset() - // ignore ENQ, NUL, XON, XOFF, DEL - case 005, 000, 021, 023, 0177: - default: - return false, true - } - return true, isPrintable -} diff --git a/vendor/github.com/ActiveState/vt10x/state.go b/vendor/github.com/ActiveState/vt10x/state.go deleted file mode 100644 index 589c866da4..0000000000 --- a/vendor/github.com/ActiveState/vt10x/state.go +++ /dev/null @@ -1,894 +0,0 @@ -package vt10x - -import ( - "io" - "log" - "sync" -) - -const ( - tabspaces = 8 -) - -const ( - attrReverse = 1 << iota - attrUnderline - attrBold - attrGfx - attrItalic - attrBlink - attrWrap -) - -const ( - cursorDefault = 1 << iota - cursorWrapNext - cursorOrigin -) - -// ModeFlag represents various terminal mode states. -type ModeFlag uint32 - -// Terminal modes -const ( - ModeWrap ModeFlag = 1 << iota - ModeInsert - ModeAppKeypad - ModeAltScreen - ModeCRLF - ModeMouseButton - ModeMouseMotion - ModeReverse - ModeKeyboardLock - ModeHide - ModeEcho - ModeAppCursor - ModeMouseSgr - Mode8bit - ModeBlink - ModeFBlink - ModeFocus - ModeMouseX10 - ModeMouseMany - ModeMouseMask = ModeMouseButton | ModeMouseMotion | ModeMouseX10 | ModeMouseMany -) - -// ChangeFlag represents possible state changes of the terminal. -type ChangeFlag uint32 - -// Terminal changes to occur in VT.ReadState -const ( - ChangedScreen ChangeFlag = 1 << iota - ChangedTitle -) - -type glyph struct { - c rune - mode int16 - fg, bg Color -} - -type line []glyph - -type cursor struct { - attr glyph - x, y int - state uint8 -} - -type parseState func(c rune) bool - -// State represents the terminal emulation state. Use Lock/Unlock -// methods to synchronize data access with VT. -type State struct { - DebugLogger *log.Logger - // RecordHistory is a flag that when set to true keeps a history of all lines that are scrolled out of view - RecordHistory bool - - w io.Writer - mu sync.Mutex - changed ChangeFlag - cols, rows int - lines []line - altLines []line - dirty []bool // line dirtiness - anydirty bool - cur, curSaved cursor - top, bottom int // scroll limits - mode ModeFlag - state parseState - str strEscape - csi csiEscape - numlock bool - tabs []bool - title string - history []line -} - -func (t *State) logf(format string, args ...interface{}) { - if t.DebugLogger != nil { - t.DebugLogger.Printf(format, args...) - } -} - -func (t *State) logln(s string) { - if t.DebugLogger != nil { - t.DebugLogger.Println(s) - } -} - -func (t *State) lock() { - t.mu.Lock() -} - -func (t *State) unlock() { - t.mu.Unlock() -} - -// Lock locks the state object's mutex. -func (t *State) Lock() { - t.mu.Lock() -} - -// Unlock resets change flags and unlocks the state object's mutex. -func (t *State) Unlock() { - t.resetChanges() - t.mu.Unlock() -} - -// Cell returns the character code, foreground color, and background -// color at position (x, y) relative to the top left of the terminal. -func (t *State) Cell(x, y int) (ch rune, fg Color, bg Color) { - return t.lines[y][x].c, Color(t.lines[y][x].fg), Color(t.lines[y][x].bg) -} - -// Cursor returns the current position of the cursor. -func (t *State) Cursor() (int, int) { - return t.cur.x, t.cur.y -} - -// CursorVisible returns the visible state of the cursor. -func (t *State) CursorVisible() bool { - return t.mode&ModeHide == 0 -} - -// Mode tests if mode is currently set. -func (t *State) Mode(mode ModeFlag) bool { - return t.mode&mode != 0 -} - -// Title returns the current title set via the tty. -func (t *State) Title() string { - return t.title -} - -/* -// ChangeMask returns a bitfield of changes that have occured by VT. -func (t *State) ChangeMask() ChangeFlag { - return t.changed -} -*/ - -// Changed returns true if change has occured. -func (t *State) Changed(change ChangeFlag) bool { - return t.changed&change != 0 -} - -// resetChanges resets the change mask and dirtiness. -func (t *State) resetChanges() { - for i := range t.dirty { - t.dirty[i] = false - } - t.anydirty = false - t.changed = 0 -} - -func (t *State) saveCursor() { - t.curSaved = t.cur -} - -func (t *State) restoreCursor() { - t.cur = t.curSaved - t.moveTo(t.cur.x, t.cur.y) -} - -// WriteString processes the given string and updates the state -// This function is usually used for testing, as it also initializes the states, -// so previous state modifications are lost -func (t *State) WriteString(s string, rows, cols int) { - t.numlock = true - t.state = t.parse - t.cur.attr.fg = DefaultBG - t.cur.attr.bg = DefaultBG - t.resize(rows, cols) - t.reset() - for _, c := range []rune(s) { - t.put(c) - } -} - -func (t *State) put(c rune) bool { - return t.state(c) -} - -func (t *State) putTab(forward bool) { - x := t.cur.x - if forward { - if x == t.cols { - return - } - for x++; x < t.cols && !t.tabs[x]; x++ { - } - } else { - if x == 0 { - return - } - for x--; x > 0 && !t.tabs[x]; x-- { - } - } - t.moveTo(x, t.cur.y) -} - -func (t *State) newline(firstCol bool) { - y := t.cur.y - if y == t.bottom { - cur := t.cur - t.cur = t.defaultCursor() - t.scrollUp(t.top, 1) - t.cur = cur - } else { - y++ - } - if firstCol { - t.moveTo(0, y) - } else { - t.moveTo(t.cur.x, y) - } -} - -// table from st, which in turn is from rxvt :) -var gfxCharTable = [62]rune{ - '↑', '↓', '→', '←', '█', '▚', '☃', // A - G - 0, 0, 0, 0, 0, 0, 0, 0, // H - O - 0, 0, 0, 0, 0, 0, 0, 0, // P - W - 0, 0, 0, 0, 0, 0, 0, ' ', // X - _ - '◆', '▒', '␉', '␌', '␍', '␊', '°', '±', // ` - g - '␤', '␋', '┘', '┐', '┌', '└', '┼', '⎺', // h - o - '⎻', '─', '⎼', '⎽', '├', '┤', '┴', '┬', // p - w - '│', '≤', '≥', 'π', '≠', '£', '·', // x - ~ -} - -func (t *State) setChar(c rune, attr *glyph, x, y int) { - if attr.mode&attrGfx != 0 { - if c >= 0x41 && c <= 0x7e && gfxCharTable[c-0x41] != 0 { - c = gfxCharTable[c-0x41] - } - } - t.changed |= ChangedScreen - t.dirty[y] = true - t.lines[y][x] = *attr - t.lines[y][x].c = c - //if t.options.BrightBold && attr.mode&attrBold != 0 && attr.fg < 8 { - if attr.mode&attrBold != 0 && attr.fg < 8 { - t.lines[y][x].fg = attr.fg + 8 - } - if attr.mode&attrReverse != 0 { - t.lines[y][x].fg = attr.bg - t.lines[y][x].bg = attr.fg - } -} - -func (t *State) defaultCursor() cursor { - c := cursor{} - c.attr.fg = DefaultFG - c.attr.bg = DefaultBG - return c -} - -func (t *State) reset() { - t.cur = t.defaultCursor() - t.saveCursor() - for i := range t.tabs { - t.tabs[i] = false - } - for i := tabspaces; i < len(t.tabs); i += tabspaces { - t.tabs[i] = true - } - t.top = 0 - t.bottom = t.rows - 1 - t.mode = ModeWrap - t.clear(0, 0, t.rows-1, t.cols-1) - t.moveTo(0, 0) - t.history = make([]line, 0) -} - -// TODO: definitely can improve allocs -func (t *State) resize(cols, rows int) bool { - if cols == t.cols && rows == t.rows { - return false - } - if cols < 1 || rows < 1 { - return false - } - slide := t.cur.y - rows + 1 - if slide > 0 { - copy(t.lines, t.lines[slide:slide+rows]) - copy(t.altLines, t.altLines[slide:slide+rows]) - } - - lines, altLines, tabs := t.lines, t.altLines, t.tabs - t.lines = make([]line, rows) - t.altLines = make([]line, rows) - t.dirty = make([]bool, rows) - t.tabs = make([]bool, cols) - - minrows := min(rows, t.rows) - mincols := min(cols, t.cols) - t.changed |= ChangedScreen - for i := 0; i < rows; i++ { - t.dirty[i] = true - t.lines[i] = make(line, cols) - t.altLines[i] = make(line, cols) - } - for i := 0; i < minrows; i++ { - copy(t.lines[i], lines[i]) - copy(t.altLines[i], altLines[i]) - } - copy(t.tabs, tabs) - if cols > t.cols { - i := t.cols - 1 - for i > 0 && !tabs[i] { - i-- - } - for i += tabspaces; i < len(tabs); i += tabspaces { - tabs[i] = true - } - } - - t.cols = cols - t.rows = rows - t.setScroll(0, rows-1) - t.moveTo(t.cur.x, t.cur.y) - for i := 0; i < 2; i++ { - if mincols < cols && minrows > 0 { - t.clear(mincols, 0, cols-1, minrows-1) - } - if cols > 0 && minrows < rows { - t.clear(0, minrows, cols-1, rows-1) - } - t.swapScreen() - } - return slide > 0 -} - -func (t *State) clear(x0, y0, x1, y1 int) { - if x0 > x1 { - x0, x1 = x1, x0 - } - if y0 > y1 { - y0, y1 = y1, y0 - } - x0 = clamp(x0, 0, t.cols-1) - x1 = clamp(x1, 0, t.cols-1) - y0 = clamp(y0, 0, t.rows-1) - y1 = clamp(y1, 0, t.rows-1) - t.changed |= ChangedScreen - for y := y0; y <= y1; y++ { - t.dirty[y] = true - for x := x0; x <= x1; x++ { - t.lines[y][x] = t.cur.attr - t.lines[y][x].c = ' ' - } - } -} - -func (t *State) clearAll() { - t.clear(0, 0, t.cols-1, t.rows-1) -} - -func (t *State) moveAbsTo(x, y int) { - if t.cur.state&cursorOrigin != 0 { - y += t.top - } - t.moveTo(x, y) -} - -func (t *State) moveTo(x, y int) { - var miny, maxy int - if t.cur.state&cursorOrigin != 0 { - miny = t.top - maxy = t.bottom - } else { - miny = 0 - maxy = t.rows - 1 - } - x = clamp(x, 0, t.cols-1) - y = clamp(y, miny, maxy) - t.changed |= ChangedScreen - t.cur.state &^= cursorWrapNext - t.cur.x = x - t.cur.y = y -} - -func (t *State) swapScreen() { - t.lines, t.altLines = t.altLines, t.lines - t.mode ^= ModeAltScreen - t.dirtyAll() -} - -func (t *State) dirtyAll() { - t.changed |= ChangedScreen - for y := 0; y < t.rows; y++ { - t.dirty[y] = true - } -} - -func (t *State) setScroll(top, bottom int) { - top = clamp(top, 0, t.rows-1) - bottom = clamp(bottom, 0, t.rows-1) - if top > bottom { - top, bottom = bottom, top - } - t.top = top - t.bottom = bottom -} - -func min(a, b int) int { - if a < b { - return a - } - return b -} - -func max(a, b int) int { - if a > b { - return a - } - return b -} - -func clamp(val, min, max int) int { - if val < min { - return min - } else if val > max { - return max - } - return val -} - -func between(val, min, max int) bool { - if val < min || val > max { - return false - } - return true -} - -func (t *State) scrollDown(orig, n int) { - n = clamp(n, 0, t.bottom-orig+1) - t.clear(0, t.bottom-n+1, t.cols-1, t.bottom) - t.changed |= ChangedScreen - for i := t.bottom; i >= orig+n; i-- { - t.lines[i], t.lines[i-n] = t.lines[i-n], t.lines[i] - t.dirty[i] = true - t.dirty[i-n] = true - } - - // TODO: selection scroll -} - -func (t *State) scrollUp(orig, n int) { - n = clamp(n, 0, t.bottom-orig+1) - if t.RecordHistory && orig == t.top { - for i := orig; i < orig+n; i++ { - l := make([]glyph, len(t.lines[i])) - copy(l, t.lines[i]) - t.history = append(t.history, l) - } - } - t.clear(0, orig, t.cols-1, orig+n-1) - t.changed |= ChangedScreen - for i := orig; i <= t.bottom-n; i++ { - t.lines[i], t.lines[i+n] = t.lines[i+n], t.lines[i] - t.dirty[i] = true - t.dirty[i+n] = true - } - - // TODO: selection scroll -} - -func (t *State) modMode(set bool, bit ModeFlag) { - if set { - t.mode |= bit - } else { - t.mode &^= bit - } -} - -func (t *State) setMode(priv bool, set bool, args []int) { - if priv { - for _, a := range args { - switch a { - case 1: // DECCKM - cursor key - t.modMode(set, ModeAppCursor) - case 5: // DECSCNM - reverse video - mode := t.mode - t.modMode(set, ModeReverse) - if mode != t.mode { - // TODO: redraw - } - case 6: // DECOM - origin - if set { - t.cur.state |= cursorOrigin - } else { - t.cur.state &^= cursorOrigin - } - t.moveAbsTo(0, 0) - case 7: // DECAWM - auto wrap - t.modMode(set, ModeWrap) - // IGNORED: - case 0, // error - 2, // DECANM - ANSI/VT52 - 3, // DECCOLM - column - 4, // DECSCLM - scroll - 8, // DECARM - auto repeat - 18, // DECPFF - printer feed - 19, // DECPEX - printer extent - 42, // DECNRCM - national characters - 12: // att610 - start blinking cursor - break - case 25: // DECTCEM - text cursor enable mode - t.modMode(!set, ModeHide) - case 9: // X10 mouse compatibility mode - t.modMode(false, ModeMouseMask) - t.modMode(set, ModeMouseX10) - case 1000: // report button press - t.modMode(false, ModeMouseMask) - t.modMode(set, ModeMouseButton) - case 1002: // report motion on button press - t.modMode(false, ModeMouseMask) - t.modMode(set, ModeMouseMotion) - case 1003: // enable all mouse motions - t.modMode(false, ModeMouseMask) - t.modMode(set, ModeMouseMany) - case 1004: // send focus events to tty - t.modMode(set, ModeFocus) - case 1006: // extended reporting mode - t.modMode(set, ModeMouseSgr) - case 1034: - t.modMode(set, Mode8bit) - case 1049, // = 1047 and 1048 - 47, 1047: - alt := t.mode&ModeAltScreen != 0 - if alt { - t.clear(0, 0, t.cols-1, t.rows-1) - } - if !set || !alt { - t.swapScreen() - } - if a != 1049 { - break - } - fallthrough - case 1048: - if set { - t.saveCursor() - } else { - t.restoreCursor() - } - case 1001: - // mouse highlight mode; can hang the terminal by design when - // implemented - case 1005: - // utf8 mouse mode; will confuse applications not supporting - // utf8 and luit - case 1015: - // urxvt mangled mouse mode; incompatiblt and can be mistaken - // for other control codes - default: - t.logf("unknown private set/reset mode %d\n", a) - } - } - } else { - for _, a := range args { - switch a { - case 0: // Error (ignored) - case 2: // KAM - keyboard action - t.modMode(set, ModeKeyboardLock) - case 4: // IRM - insertion-replacement - t.modMode(set, ModeInsert) - t.logln("insert mode not implemented") - case 12: // SRM - send/receive - t.modMode(set, ModeEcho) - case 20: // LNM - linefeed/newline - t.modMode(set, ModeCRLF) - case 34: - t.logln("right-to-left mode not implemented") - case 96: - t.logln("right-to-left copy mode not implemented") - default: - t.logf("unknown set/reset mode %d\n", a) - } - } - } -} - -func (t *State) setAttr(attr []int) { - if len(attr) == 0 { - attr = []int{0} - } - for i := 0; i < len(attr); i++ { - a := attr[i] - switch a { - case 0: - t.cur.attr.mode &^= attrReverse | attrUnderline | attrBold | attrItalic | attrBlink - t.cur.attr.fg = DefaultFG - t.cur.attr.bg = DefaultBG - case 1: - t.cur.attr.mode |= attrBold - case 3: - t.cur.attr.mode |= attrItalic - case 4: - t.cur.attr.mode |= attrUnderline - case 5, 6: // slow, rapid blink - t.cur.attr.mode |= attrBlink - case 7: - t.cur.attr.mode |= attrReverse - case 21, 22: - t.cur.attr.mode &^= attrBold - case 23: - t.cur.attr.mode &^= attrItalic - case 24: - t.cur.attr.mode &^= attrUnderline - case 25, 26: - t.cur.attr.mode &^= attrBlink - case 27: - t.cur.attr.mode &^= attrReverse - case 38: - if i+2 < len(attr) && attr[i+1] == 5 { - i += 2 - if between(attr[i], 0, 255) { - t.cur.attr.fg = Color(attr[i]) - } else { - t.logf("bad fgcolor %d\n", attr[i]) - } - } else { - t.logf("gfx attr %d unknown\n", a) - } - case 39: - t.cur.attr.fg = DefaultFG - case 48: - if i+2 < len(attr) && attr[i+1] == 5 { - i += 2 - if between(attr[i], 0, 255) { - t.cur.attr.bg = Color(attr[i]) - } else { - t.logf("bad bgcolor %d\n", attr[i]) - } - } else { - t.logf("gfx attr %d unknown\n", a) - } - case 49: - t.cur.attr.bg = DefaultBG - default: - if between(a, 30, 37) { - t.cur.attr.fg = Color(a - 30) - } else if between(a, 40, 47) { - t.cur.attr.bg = Color(a - 40) - } else if between(a, 90, 97) { - t.cur.attr.fg = Color(a - 90 + 8) - } else if between(a, 100, 107) { - t.cur.attr.bg = Color(a - 100 + 8) - } else { - t.logf("gfx attr %d unknown\n", a) - } - } - } -} - -func (t *State) insertBlanks(n int) { - src := t.cur.x - dst := src + n - size := t.cols - dst - t.changed |= ChangedScreen - t.dirty[t.cur.y] = true - - if dst >= t.cols { - t.clear(t.cur.x, t.cur.y, t.cols-1, t.cur.y) - } else { - copy(t.lines[t.cur.y][dst:dst+size], t.lines[t.cur.y][src:src+size]) - t.clear(src, t.cur.y, dst-1, t.cur.y) - } -} - -func (t *State) insertBlankLines(n int) { - if t.cur.y < t.top || t.cur.y > t.bottom { - return - } - t.scrollDown(t.cur.y, n) -} - -func (t *State) deleteLines(n int) { - if t.cur.y < t.top || t.cur.y > t.bottom { - return - } - t.scrollUp(t.cur.y, n) -} - -func (t *State) deleteChars(n int) { - src := t.cur.x + n - dst := t.cur.x - size := t.cols - src - t.changed |= ChangedScreen - t.dirty[t.cur.y] = true - - if src >= t.cols { - t.clear(t.cur.x, t.cur.y, t.cols-1, t.cur.y) - } else { - copy(t.lines[t.cur.y][dst:dst+size], t.lines[t.cur.y][src:src+size]) - t.clear(t.cols-n, t.cur.y, t.cols-1, t.cur.y) - } -} - -func (t *State) setTitle(title string) { - t.changed |= ChangedTitle - t.title = title -} - -// GlobalCursor returns the current position including the history -func (t *State) GlobalCursor() (int, int) { - cx := t.cur.x - if t.cur.state&cursorWrapNext != 0 { - cx++ - } - return cx, t.cur.y + len(t.history) -} - -// Size returns rows and columns of state -func (t *State) Size() (rows int, cols int) { - return t.rows, t.cols -} - -// String returns a string representation of the terminal output -func (t *State) String() string { - return t.string(false, false, -1, 0) -} - -// StringBeforeCursor returns the terminal output in front of the cursor -func (t *State) StringBeforeCursor() string { - return t.string(false, true, -1, 0) -} - -// UnwrappedStringBeforeCursor returns the terminal output in front of the cursor without the automatic line wrapping -func (t *State) UnwrappedStringBeforeCursor() string { - return t.string(true, true, -1, 0) -} - -// StringToCursorFrom returns the string before the cursor starting from the global position row and col -func (t *State) StringToCursorFrom(row int, col int) string { - return t.string(false, true, row, col) -} - -// UnwrappedStringToCursorFrom returns the string before the cursor starting from the global position row and col without the automatic line wrapping -func (t *State) UnwrappedStringToCursorFrom(row int, col int) string { - return t.string(true, true, row, col) -} - -// matchRune checks if the rune `expected` matches the rune `got` -// it also returns the updated index `i` assuming that we are going backwards in an array of of expected runes (as is done in HasStringBeforeCursor()) -// if `ignoreNewlinesAndSpaces` is true, newlines and spaces that mismatch are skipped over. -func matchRune(got rune, expected []rune, i int, ignoreNewlinesAndSpaces bool) (bool, int) { - exactMatch := got == expected[i] - if exactMatch { - return true, i - 1 - } - if !ignoreNewlinesAndSpaces { - return false, i - } - - if got == ' ' { - return true, i - } - - if expected[i] == ' ' || expected[i] == '\n' || expected[i] == '\r' { - if i == 0 { - return true, -1 - } - return matchRune(got, expected, i-1, true) - } - - return false, i -} - -// HasStringBeforeCursor checks whether `m` matches the string before the cursor position -// If ignoreNewlinesAndSpaces is set to true, newline and space characters are skipped over -func (t *State) HasStringBeforeCursor(m string, ignoreNewlinesAndSpaces bool) bool { - runesToMatch := []rune(m) - // set index of current rune to be matched - i := len(runesToMatch) - 1 - - // quick check if there actually is enough data written to the terminal - if len(runesToMatch) > (len(t.history)+t.cur.y+1)*t.cols { - return false - } - - // if we are in the last column and in `cursorWrapNext` mode, - // the current character is in front of the cursor ... - onWrap := t.cur.state&cursorWrapNext != 0 - x := t.cur.x - if !onWrap { - // ... otherwise go one character back - x-- - } - y := t.cur.y - // first search for matching characters on the current screen - for ; y >= 0 && i >= 0; y-- { - for ; x >= 0 && i >= 0; x-- { - c, _, _ := t.Cell(x, y) - var isOk bool - isOk, i = matchRune(c, runesToMatch, i, ignoreNewlinesAndSpaces) - if !isOk { - return false - } - } - x = t.cols - 1 - } - // then search for matching characters in the scroll buffer (history) - for y = len(t.history) - 1; y >= 0 && i >= 0; y-- { - for x = t.cols - 1; x >= 0 && i >= 0; x-- { - c := t.history[y][x].c - var isOk bool - isOk, i = matchRune(c, runesToMatch, i, ignoreNewlinesAndSpaces) - if !isOk { - return false - } - } - } - - // ensure that we matched all the characters that we were looking for - return i == -1 -} - -func (t *State) string(unwrap bool, toCursor bool, fromRow int, fromCol int) string { - t.Lock() - defer t.Unlock() - - lh := len(t.history) - if fromRow == -1 { - fromRow = lh - } - - var view []rune - x := fromCol - for y := fromRow; y < lh; y++ { - for ; x < t.cols; x++ { - c := t.history[y][x].c - view = append(view, c) - } - x = 0 - if !unwrap { - view = append(view, '\n') - } - fromRow = lh - } - - onWrap := t.cur.state&cursorWrapNext != 0 - curX := t.cur.x - if onWrap { - curX++ - } - for y := fromRow - lh; y < t.rows && (!toCursor || y <= t.cur.y); y++ { - for ; x < t.cols; x++ { - if toCursor && x == curX && y == t.cur.y { - break - } - c, _, _ := t.Cell(x, y) - view = append(view, c) - } - x = 0 - if !unwrap { - view = append(view, '\n') - } - } - - return string(view) -} diff --git a/vendor/github.com/ActiveState/vt10x/str.go b/vendor/github.com/ActiveState/vt10x/str.go deleted file mode 100644 index c8ca50cbcb..0000000000 --- a/vendor/github.com/ActiveState/vt10x/str.go +++ /dev/null @@ -1,94 +0,0 @@ -package vt10x - -import ( - "strconv" - "strings" -) - -// STR sequences are similar to CSI sequences, but have string arguments (and -// as far as I can tell, don't really have a name; STR is the name I took from -// suckless which I imagine comes from rxvt or xterm). -type strEscape struct { - typ rune - buf []rune - args []string -} - -func (s *strEscape) reset() { - s.typ = 0 - s.buf = s.buf[:0] - s.args = nil -} - -func (s *strEscape) put(c rune) { - // TODO: improve allocs with an array backed slice; bench first - if len(s.buf) < 256 { - s.buf = append(s.buf, c) - } - // Going by st, it is better to remain silent when the STR sequence is not - // ended so that it is apparent to users something is wrong. The length sanity - // check ensures we don't absorb the entire stream into memory. - // TODO: see what rxvt or xterm does -} - -func (s *strEscape) parse() { - s.args = strings.Split(string(s.buf), ";") -} - -func (s *strEscape) arg(i, def int) int { - if i >= len(s.args) || i < 0 { - return def - } - i, err := strconv.Atoi(s.args[i]) - if err != nil { - return def - } - return i -} - -func (s *strEscape) argString(i int, def string) string { - if i >= len(s.args) || i < 0 { - return def - } - return s.args[i] -} - -func (t *State) handleSTR() { - s := &t.str - s.parse() - - switch s.typ { - case ']': // OSC - operating system command - switch d := s.arg(0, 0); d { - case 0, 1, 2: - title := s.argString(1, "") - if title != "" { - t.setTitle(title) - } - case 4: // color set - if len(s.args) < 3 { - break - } - // setcolorname(s.arg(1, 0), s.argString(2, "")) - case 104: // color reset - // TODO: complain about invalid color, redraw, etc. - // setcolorname(s.arg(1, 0), nil) - default: - t.logf("unknown OSC command %d\n", d) - // TODO: s.dump() - } - case 'k': // old title set compatibility - title := s.argString(0, "") - if title != "" { - t.setTitle(title) - } - default: - // TODO: Ignore these codes instead of complain? - // 'P': // DSC - device control string - // '_': // APC - application program command - // '^': // PM - privacy message - - t.logf("unhandled STR sequence '%c'\n", s.typ) - // t.str.dump() - } -} diff --git a/vendor/github.com/ActiveState/vt10x/strip.go b/vendor/github.com/ActiveState/vt10x/strip.go deleted file mode 100644 index 232f90dc24..0000000000 --- a/vendor/github.com/ActiveState/vt10x/strip.go +++ /dev/null @@ -1,55 +0,0 @@ -package vt10x - -import ( - "unicode" - "unicode/utf8" -) - -type VTStrip struct { - VT -} - -func NewStrip() *VTStrip { - t := &VTStrip{ - VT{ - dest: &State{}, - rwc: nil, - }, - } - t.init() - return t -} - -// Strip returns in with all VT10x escape sequences stripped. An error is -// also returned if one or more of the stripped escape sequences are invalid. -func (t *VTStrip) Strip(in []byte) ([]byte, error) { - var locked bool - defer func() { - if locked { - t.dest.unlock() - } - }() - out := make([]byte, len(in)) - nout := 0 - s := string(in) - for i, w := 0, 0; i < len(s); i += w { - c, sz := utf8.DecodeRuneInString(s[i:]) - w = sz - if c == unicode.ReplacementChar && sz == 1 { - t.dest.logln("invalid utf8 sequence") - break - } - if !locked { - t.dest.lock() - locked = true - } - - // put rune for parsing and update state - isPrintable := t.dest.put(c) - if isPrintable { - copy(out[nout:nout+w], in[i:i+w]) - nout += w - } - } - return out[:nout], nil -} diff --git a/vendor/github.com/ActiveState/vt10x/vt.go b/vendor/github.com/ActiveState/vt10x/vt.go deleted file mode 100644 index 954a51a3f6..0000000000 --- a/vendor/github.com/ActiveState/vt10x/vt.go +++ /dev/null @@ -1,152 +0,0 @@ -package vt10x - -import ( - "bufio" - "bytes" - "io" - "unicode" - "unicode/utf8" -) - -// VT represents the virtual terminal emulator. -type VT struct { - dest *State - in io.Reader - out io.Writer - rwc io.ReadWriteCloser - br *bufio.Reader -} - -// Create initializes a virtual terminal emulator with the target state -// and io.ReadWriteCloser input. -func Create(state *State, rwc io.ReadWriteCloser) (*VT, error) { - t := &VT{ - dest: state, - rwc: rwc, - } - t.init() - return t, nil -} - -func New(state *State, in io.Reader, out io.Writer) (*VT, error) { - t := &VT{ - dest: state, - in: in, - out: out, - } - t.init() - return t, nil -} - -func (t *VT) init() { - if t.rwc != nil { - t.br = bufio.NewReader(t.rwc) - t.dest.w = t.rwc - } else { - t.br = bufio.NewReader(t.in) - t.dest.w = t.out - } - t.dest.numlock = true - t.dest.state = t.dest.parse - t.dest.cur.attr.fg = DefaultFG - t.dest.cur.attr.bg = DefaultBG - t.Resize(80, 24) - t.dest.reset() -} - -// WriteRune writes a single rune to the terminal -func (t *VT) WriteRune(r rune) { - t.dest.lock() - defer t.dest.unlock() - t.dest.put(r) -} - -// Write parses input and writes terminal changes to state. -func (t *VT) Write(p []byte) (int, error) { - var written int - r := bytes.NewReader(p) - t.dest.lock() - defer t.dest.unlock() - for { - c, sz, err := r.ReadRune() - if err != nil { - if err == io.EOF { - break - } - return written, err - } - written += sz - if c == unicode.ReplacementChar && sz == 1 { - if r.Len() == 0 { - // not enough bytes for a full rune - return written - 1, nil - } - t.dest.logln("invalid utf8 sequence") - continue - } - t.dest.put(c) - } - return written, nil -} - -// Close closes the io.ReadWriteCloser. -func (t *VT) Close() error { - if t.rwc == nil { - return nil - } - return t.rwc.Close() -} - -// Parse blocks on read on pty or io.ReadCloser, then parses sequences until -// buffer empties. State is locked as soon as first rune is read, and unlocked -// when buffer is empty. -// TODO: add tests for expected blocking behavior -func (t *VT) Parse() error { - var locked bool - defer func() { - if locked { - t.dest.unlock() - } - }() - for { - c, sz, err := t.br.ReadRune() - if err != nil { - return err - } - if c == unicode.ReplacementChar && sz == 1 { - t.dest.logln("invalid utf8 sequence") - break - } - if !locked { - t.dest.lock() - locked = true - } - - // put rune for parsing and update state - t.dest.put(c) - - // break if our buffer is empty, or if buffer contains an - // incomplete rune. - n := t.br.Buffered() - if n == 0 || (n < 4 && !fullRuneBuffered(t.br)) { - break - } - } - return nil -} - -func fullRuneBuffered(br *bufio.Reader) bool { - n := br.Buffered() - buf, err := br.Peek(n) - if err != nil { - return false - } - return utf8.FullRune(buf) -} - -// Resize reports new size to pty and updates state. -func (t *VT) Resize(cols, rows int) { - t.dest.lock() - defer t.dest.unlock() - _ = t.dest.resize(cols, rows) -} diff --git a/vendor/github.com/kr/pty/.gitignore b/vendor/github.com/kr/pty/.gitignore deleted file mode 100644 index 1f0a99f2f2..0000000000 --- a/vendor/github.com/kr/pty/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -[568].out -_go* -_test* -_obj diff --git a/vendor/github.com/kr/pty/License b/vendor/github.com/kr/pty/License deleted file mode 100644 index 6b7558b6b4..0000000000 --- a/vendor/github.com/kr/pty/License +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2011 Keith Rarick - -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: - -The above copyright notice and this permission notice shall -be included in all copies or substantial portions of the -Software. - -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. diff --git a/vendor/github.com/kr/pty/README.md b/vendor/github.com/kr/pty/README.md deleted file mode 100644 index f9bb002e03..0000000000 --- a/vendor/github.com/kr/pty/README.md +++ /dev/null @@ -1,100 +0,0 @@ -# pty - -Pty is a Go package for using unix pseudo-terminals. - -## Install - - go get github.com/kr/pty - -## Example - -### Command - -```go -package main - -import ( - "github.com/kr/pty" - "io" - "os" - "os/exec" -) - -func main() { - c := exec.Command("grep", "--color=auto", "bar") - f, err := pty.Start(c) - if err != nil { - panic(err) - } - - go func() { - f.Write([]byte("foo\n")) - f.Write([]byte("bar\n")) - f.Write([]byte("baz\n")) - f.Write([]byte{4}) // EOT - }() - io.Copy(os.Stdout, f) -} -``` - -### Shell - -```go -package main - -import ( - "io" - "log" - "os" - "os/exec" - "os/signal" - "syscall" - - "github.com/kr/pty" - "golang.org/x/crypto/ssh/terminal" -) - -func test() error { - // Create arbitrary command. - c := exec.Command("bash") - - // Start the command with a pty. - ptmx, err := pty.Start(c) - if err != nil { - return err - } - // Make sure to close the pty at the end. - defer func() { _ = ptmx.Close() }() // Best effort. - - // Handle pty size. - ch := make(chan os.Signal, 1) - signal.Notify(ch, syscall.SIGWINCH) - go func() { - for range ch { - if err := pty.InheritSize(os.Stdin, ptmx); err != nil { - log.Printf("error resizing pty: %s", err) - } - } - }() - ch <- syscall.SIGWINCH // Initial resize. - - // Set stdin in raw mode. - oldState, err := terminal.MakeRaw(int(os.Stdin.Fd())) - if err != nil { - panic(err) - } - defer func() { _ = terminal.Restore(int(os.Stdin.Fd()), oldState) }() // Best effort. - - // Copy stdin to the pty and the pty to stdout. - go func() { _, _ = io.Copy(ptmx, os.Stdin) }() - _, _ = io.Copy(os.Stdout, ptmx) - - return nil -} - -func main() { - if err := test(); err != nil { - log.Fatal(err) - } -} -``` diff --git a/vendor/github.com/kr/pty/doc.go b/vendor/github.com/kr/pty/doc.go deleted file mode 100644 index 190cfbea92..0000000000 --- a/vendor/github.com/kr/pty/doc.go +++ /dev/null @@ -1,16 +0,0 @@ -// Package pty provides functions for working with Unix terminals. -package pty - -import ( - "errors" - "os" -) - -// ErrUnsupported is returned if a function is not -// available on the current platform. -var ErrUnsupported = errors.New("unsupported") - -// Opens a pty and its corresponding tty. -func Open() (pty, tty *os.File, err error) { - return open() -} diff --git a/vendor/github.com/kr/pty/ioctl.go b/vendor/github.com/kr/pty/ioctl.go deleted file mode 100644 index c57c19e7e2..0000000000 --- a/vendor/github.com/kr/pty/ioctl.go +++ /dev/null @@ -1,13 +0,0 @@ -// +build !windows - -package pty - -import "syscall" - -func ioctl(fd, cmd, ptr uintptr) error { - _, _, e := syscall.Syscall(syscall.SYS_IOCTL, fd, cmd, ptr) - if e != 0 { - return e - } - return nil -} diff --git a/vendor/github.com/kr/pty/ioctl_bsd.go b/vendor/github.com/kr/pty/ioctl_bsd.go deleted file mode 100644 index 73b12c53cf..0000000000 --- a/vendor/github.com/kr/pty/ioctl_bsd.go +++ /dev/null @@ -1,39 +0,0 @@ -// +build darwin dragonfly freebsd netbsd openbsd - -package pty - -// from -const ( - _IOC_VOID uintptr = 0x20000000 - _IOC_OUT uintptr = 0x40000000 - _IOC_IN uintptr = 0x80000000 - _IOC_IN_OUT uintptr = _IOC_OUT | _IOC_IN - _IOC_DIRMASK = _IOC_VOID | _IOC_OUT | _IOC_IN - - _IOC_PARAM_SHIFT = 13 - _IOC_PARAM_MASK = (1 << _IOC_PARAM_SHIFT) - 1 -) - -func _IOC_PARM_LEN(ioctl uintptr) uintptr { - return (ioctl >> 16) & _IOC_PARAM_MASK -} - -func _IOC(inout uintptr, group byte, ioctl_num uintptr, param_len uintptr) uintptr { - return inout | (param_len&_IOC_PARAM_MASK)<<16 | uintptr(group)<<8 | ioctl_num -} - -func _IO(group byte, ioctl_num uintptr) uintptr { - return _IOC(_IOC_VOID, group, ioctl_num, 0) -} - -func _IOR(group byte, ioctl_num uintptr, param_len uintptr) uintptr { - return _IOC(_IOC_OUT, group, ioctl_num, param_len) -} - -func _IOW(group byte, ioctl_num uintptr, param_len uintptr) uintptr { - return _IOC(_IOC_IN, group, ioctl_num, param_len) -} - -func _IOWR(group byte, ioctl_num uintptr, param_len uintptr) uintptr { - return _IOC(_IOC_IN_OUT, group, ioctl_num, param_len) -} diff --git a/vendor/github.com/kr/pty/mktypes.bash b/vendor/github.com/kr/pty/mktypes.bash deleted file mode 100644 index 82ee16721c..0000000000 --- a/vendor/github.com/kr/pty/mktypes.bash +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -GOOSARCH="${GOOS}_${GOARCH}" -case "$GOOSARCH" in -_* | *_ | _) - echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2 - exit 1 - ;; -esac - -GODEFS="go tool cgo -godefs" - -$GODEFS types.go |gofmt > ztypes_$GOARCH.go - -case $GOOS in -freebsd|dragonfly|openbsd) - $GODEFS types_$GOOS.go |gofmt > ztypes_$GOOSARCH.go - ;; -esac diff --git a/vendor/github.com/kr/pty/pty_darwin.go b/vendor/github.com/kr/pty/pty_darwin.go deleted file mode 100644 index 6344b6b0ef..0000000000 --- a/vendor/github.com/kr/pty/pty_darwin.go +++ /dev/null @@ -1,65 +0,0 @@ -package pty - -import ( - "errors" - "os" - "syscall" - "unsafe" -) - -func open() (pty, tty *os.File, err error) { - pFD, err := syscall.Open("/dev/ptmx", syscall.O_RDWR|syscall.O_CLOEXEC, 0) - if err != nil { - return nil, nil, err - } - p := os.NewFile(uintptr(pFD), "/dev/ptmx") - // In case of error after this point, make sure we close the ptmx fd. - defer func() { - if err != nil { - _ = p.Close() // Best effort. - } - }() - - sname, err := ptsname(p) - if err != nil { - return nil, nil, err - } - - if err := grantpt(p); err != nil { - return nil, nil, err - } - - if err := unlockpt(p); err != nil { - return nil, nil, err - } - - t, err := os.OpenFile(sname, os.O_RDWR, 0) - if err != nil { - return nil, nil, err - } - return p, t, nil -} - -func ptsname(f *os.File) (string, error) { - n := make([]byte, _IOC_PARM_LEN(syscall.TIOCPTYGNAME)) - - err := ioctl(f.Fd(), syscall.TIOCPTYGNAME, uintptr(unsafe.Pointer(&n[0]))) - if err != nil { - return "", err - } - - for i, c := range n { - if c == 0 { - return string(n[:i]), nil - } - } - return "", errors.New("TIOCPTYGNAME string not NUL-terminated") -} - -func grantpt(f *os.File) error { - return ioctl(f.Fd(), syscall.TIOCPTYGRANT, 0) -} - -func unlockpt(f *os.File) error { - return ioctl(f.Fd(), syscall.TIOCPTYUNLK, 0) -} diff --git a/vendor/github.com/kr/pty/pty_dragonfly.go b/vendor/github.com/kr/pty/pty_dragonfly.go deleted file mode 100644 index b7d1f20f29..0000000000 --- a/vendor/github.com/kr/pty/pty_dragonfly.go +++ /dev/null @@ -1,80 +0,0 @@ -package pty - -import ( - "errors" - "os" - "strings" - "syscall" - "unsafe" -) - -// same code as pty_darwin.go -func open() (pty, tty *os.File, err error) { - p, err := os.OpenFile("/dev/ptmx", os.O_RDWR, 0) - if err != nil { - return nil, nil, err - } - // In case of error after this point, make sure we close the ptmx fd. - defer func() { - if err != nil { - _ = p.Close() // Best effort. - } - }() - - sname, err := ptsname(p) - if err != nil { - return nil, nil, err - } - - if err := grantpt(p); err != nil { - return nil, nil, err - } - - if err := unlockpt(p); err != nil { - return nil, nil, err - } - - t, err := os.OpenFile(sname, os.O_RDWR, 0) - if err != nil { - return nil, nil, err - } - return p, t, nil -} - -func grantpt(f *os.File) error { - _, err := isptmaster(f.Fd()) - return err -} - -func unlockpt(f *os.File) error { - _, err := isptmaster(f.Fd()) - return err -} - -func isptmaster(fd uintptr) (bool, error) { - err := ioctl(fd, syscall.TIOCISPTMASTER, 0) - return err == nil, err -} - -var ( - emptyFiodgnameArg fiodgnameArg - ioctl_FIODNAME = _IOW('f', 120, unsafe.Sizeof(emptyFiodgnameArg)) -) - -func ptsname(f *os.File) (string, error) { - name := make([]byte, _C_SPECNAMELEN) - fa := fiodgnameArg{Name: (*byte)(unsafe.Pointer(&name[0])), Len: _C_SPECNAMELEN, Pad_cgo_0: [4]byte{0, 0, 0, 0}} - - err := ioctl(f.Fd(), ioctl_FIODNAME, uintptr(unsafe.Pointer(&fa))) - if err != nil { - return "", err - } - - for i, c := range name { - if c == 0 { - s := "/dev/" + string(name[:i]) - return strings.Replace(s, "ptm", "pts", -1), nil - } - } - return "", errors.New("TIOCPTYGNAME string not NUL-terminated") -} diff --git a/vendor/github.com/kr/pty/pty_freebsd.go b/vendor/github.com/kr/pty/pty_freebsd.go deleted file mode 100644 index 63b6d91337..0000000000 --- a/vendor/github.com/kr/pty/pty_freebsd.go +++ /dev/null @@ -1,78 +0,0 @@ -package pty - -import ( - "errors" - "os" - "syscall" - "unsafe" -) - -func posixOpenpt(oflag int) (fd int, err error) { - r0, _, e1 := syscall.Syscall(syscall.SYS_POSIX_OPENPT, uintptr(oflag), 0, 0) - fd = int(r0) - if e1 != 0 { - err = e1 - } - return fd, err -} - -func open() (pty, tty *os.File, err error) { - fd, err := posixOpenpt(syscall.O_RDWR | syscall.O_CLOEXEC) - if err != nil { - return nil, nil, err - } - p := os.NewFile(uintptr(fd), "/dev/pts") - // In case of error after this point, make sure we close the pts fd. - defer func() { - if err != nil { - _ = p.Close() // Best effort. - } - }() - - sname, err := ptsname(p) - if err != nil { - return nil, nil, err - } - - t, err := os.OpenFile("/dev/"+sname, os.O_RDWR, 0) - if err != nil { - return nil, nil, err - } - return p, t, nil -} - -func isptmaster(fd uintptr) (bool, error) { - err := ioctl(fd, syscall.TIOCPTMASTER, 0) - return err == nil, err -} - -var ( - emptyFiodgnameArg fiodgnameArg - ioctlFIODGNAME = _IOW('f', 120, unsafe.Sizeof(emptyFiodgnameArg)) -) - -func ptsname(f *os.File) (string, error) { - master, err := isptmaster(f.Fd()) - if err != nil { - return "", err - } - if !master { - return "", syscall.EINVAL - } - - const n = _C_SPECNAMELEN + 1 - var ( - buf = make([]byte, n) - arg = fiodgnameArg{Len: n, Buf: (*byte)(unsafe.Pointer(&buf[0]))} - ) - if err := ioctl(f.Fd(), ioctlFIODGNAME, uintptr(unsafe.Pointer(&arg))); err != nil { - return "", err - } - - for i, c := range buf { - if c == 0 { - return string(buf[:i]), nil - } - } - return "", errors.New("FIODGNAME string not NUL-terminated") -} diff --git a/vendor/github.com/kr/pty/pty_linux.go b/vendor/github.com/kr/pty/pty_linux.go deleted file mode 100644 index 296dd21298..0000000000 --- a/vendor/github.com/kr/pty/pty_linux.go +++ /dev/null @@ -1,51 +0,0 @@ -package pty - -import ( - "os" - "strconv" - "syscall" - "unsafe" -) - -func open() (pty, tty *os.File, err error) { - p, err := os.OpenFile("/dev/ptmx", os.O_RDWR, 0) - if err != nil { - return nil, nil, err - } - // In case of error after this point, make sure we close the ptmx fd. - defer func() { - if err != nil { - _ = p.Close() // Best effort. - } - }() - - sname, err := ptsname(p) - if err != nil { - return nil, nil, err - } - - if err := unlockpt(p); err != nil { - return nil, nil, err - } - - t, err := os.OpenFile(sname, os.O_RDWR|syscall.O_NOCTTY, 0) - if err != nil { - return nil, nil, err - } - return p, t, nil -} - -func ptsname(f *os.File) (string, error) { - var n _C_uint - err := ioctl(f.Fd(), syscall.TIOCGPTN, uintptr(unsafe.Pointer(&n))) - if err != nil { - return "", err - } - return "/dev/pts/" + strconv.Itoa(int(n)), nil -} - -func unlockpt(f *os.File) error { - var u _C_int - // use TIOCSPTLCK with a zero valued arg to clear the slave pty lock - return ioctl(f.Fd(), syscall.TIOCSPTLCK, uintptr(unsafe.Pointer(&u))) -} diff --git a/vendor/github.com/kr/pty/pty_openbsd.go b/vendor/github.com/kr/pty/pty_openbsd.go deleted file mode 100644 index 6e7aeae7c0..0000000000 --- a/vendor/github.com/kr/pty/pty_openbsd.go +++ /dev/null @@ -1,33 +0,0 @@ -package pty - -import ( - "os" - "syscall" - "unsafe" -) - -func open() (pty, tty *os.File, err error) { - /* - * from ptm(4): - * The PTMGET command allocates a free pseudo terminal, changes its - * ownership to the caller, revokes the access privileges for all previous - * users, opens the file descriptors for the master and slave devices and - * returns them to the caller in struct ptmget. - */ - - p, err := os.OpenFile("/dev/ptm", os.O_RDWR|syscall.O_CLOEXEC, 0) - if err != nil { - return nil, nil, err - } - defer p.Close() - - var ptm ptmget - if err := ioctl(p.Fd(), uintptr(ioctl_PTMGET), uintptr(unsafe.Pointer(&ptm))); err != nil { - return nil, nil, err - } - - pty = os.NewFile(uintptr(ptm.Cfd), "/dev/ptm") - tty = os.NewFile(uintptr(ptm.Sfd), "/dev/ptm") - - return pty, tty, nil -} diff --git a/vendor/github.com/kr/pty/pty_unsupported.go b/vendor/github.com/kr/pty/pty_unsupported.go deleted file mode 100644 index 9a3e721bc4..0000000000 --- a/vendor/github.com/kr/pty/pty_unsupported.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build !linux,!darwin,!freebsd,!dragonfly,!openbsd - -package pty - -import ( - "os" -) - -func open() (pty, tty *os.File, err error) { - return nil, nil, ErrUnsupported -} diff --git a/vendor/github.com/kr/pty/run.go b/vendor/github.com/kr/pty/run.go deleted file mode 100644 index baecca8af9..0000000000 --- a/vendor/github.com/kr/pty/run.go +++ /dev/null @@ -1,34 +0,0 @@ -// +build !windows - -package pty - -import ( - "os" - "os/exec" - "syscall" -) - -// Start assigns a pseudo-terminal tty os.File to c.Stdin, c.Stdout, -// and c.Stderr, calls c.Start, and returns the File of the tty's -// corresponding pty. -func Start(c *exec.Cmd) (pty *os.File, err error) { - pty, tty, err := Open() - if err != nil { - return nil, err - } - defer tty.Close() - c.Stdout = tty - c.Stdin = tty - c.Stderr = tty - if c.SysProcAttr == nil { - c.SysProcAttr = &syscall.SysProcAttr{} - } - c.SysProcAttr.Setctty = true - c.SysProcAttr.Setsid = true - err = c.Start() - if err != nil { - pty.Close() - return nil, err - } - return pty, err -} diff --git a/vendor/github.com/kr/pty/util.go b/vendor/github.com/kr/pty/util.go deleted file mode 100644 index 68a8584cfe..0000000000 --- a/vendor/github.com/kr/pty/util.go +++ /dev/null @@ -1,64 +0,0 @@ -// +build !windows - -package pty - -import ( - "os" - "syscall" - "unsafe" -) - -// InheritSize applies the terminal size of master to slave. This should be run -// in a signal handler for syscall.SIGWINCH to automatically resize the slave when -// the master receives a window size change notification. -func InheritSize(master, slave *os.File) error { - size, err := GetsizeFull(master) - if err != nil { - return err - } - err = Setsize(slave, size) - if err != nil { - return err - } - return nil -} - -// Setsize resizes t to s. -func Setsize(t *os.File, ws *Winsize) error { - return windowRectCall(ws, t.Fd(), syscall.TIOCSWINSZ) -} - -// GetsizeFull returns the full terminal size description. -func GetsizeFull(t *os.File) (size *Winsize, err error) { - var ws Winsize - err = windowRectCall(&ws, t.Fd(), syscall.TIOCGWINSZ) - return &ws, err -} - -// Getsize returns the number of rows (lines) and cols (positions -// in each line) in terminal t. -func Getsize(t *os.File) (rows, cols int, err error) { - ws, err := GetsizeFull(t) - return int(ws.Rows), int(ws.Cols), err -} - -// Winsize describes the terminal size. -type Winsize struct { - Rows uint16 // ws_row: Number of rows (in cells) - Cols uint16 // ws_col: Number of columns (in cells) - X uint16 // ws_xpixel: Width in pixels - Y uint16 // ws_ypixel: Height in pixels -} - -func windowRectCall(ws *Winsize, fd, a2 uintptr) error { - _, _, errno := syscall.Syscall( - syscall.SYS_IOCTL, - fd, - a2, - uintptr(unsafe.Pointer(ws)), - ) - if errno != 0 { - return syscall.Errno(errno) - } - return nil -} diff --git a/vendor/github.com/kr/pty/ztypes_386.go b/vendor/github.com/kr/pty/ztypes_386.go deleted file mode 100644 index ff0b8fd838..0000000000 --- a/vendor/github.com/kr/pty/ztypes_386.go +++ /dev/null @@ -1,9 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types.go - -package pty - -type ( - _C_int int32 - _C_uint uint32 -) diff --git a/vendor/github.com/kr/pty/ztypes_amd64.go b/vendor/github.com/kr/pty/ztypes_amd64.go deleted file mode 100644 index ff0b8fd838..0000000000 --- a/vendor/github.com/kr/pty/ztypes_amd64.go +++ /dev/null @@ -1,9 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types.go - -package pty - -type ( - _C_int int32 - _C_uint uint32 -) diff --git a/vendor/github.com/kr/pty/ztypes_arm.go b/vendor/github.com/kr/pty/ztypes_arm.go deleted file mode 100644 index ff0b8fd838..0000000000 --- a/vendor/github.com/kr/pty/ztypes_arm.go +++ /dev/null @@ -1,9 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types.go - -package pty - -type ( - _C_int int32 - _C_uint uint32 -) diff --git a/vendor/github.com/kr/pty/ztypes_arm64.go b/vendor/github.com/kr/pty/ztypes_arm64.go deleted file mode 100644 index 6c29a4b918..0000000000 --- a/vendor/github.com/kr/pty/ztypes_arm64.go +++ /dev/null @@ -1,11 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types.go - -// +build arm64 - -package pty - -type ( - _C_int int32 - _C_uint uint32 -) diff --git a/vendor/github.com/kr/pty/ztypes_dragonfly_amd64.go b/vendor/github.com/kr/pty/ztypes_dragonfly_amd64.go deleted file mode 100644 index 6b0ba037f8..0000000000 --- a/vendor/github.com/kr/pty/ztypes_dragonfly_amd64.go +++ /dev/null @@ -1,14 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_dragonfly.go - -package pty - -const ( - _C_SPECNAMELEN = 0x3f -) - -type fiodgnameArg struct { - Name *byte - Len uint32 - Pad_cgo_0 [4]byte -} diff --git a/vendor/github.com/kr/pty/ztypes_freebsd_386.go b/vendor/github.com/kr/pty/ztypes_freebsd_386.go deleted file mode 100644 index d9975374e3..0000000000 --- a/vendor/github.com/kr/pty/ztypes_freebsd_386.go +++ /dev/null @@ -1,13 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_freebsd.go - -package pty - -const ( - _C_SPECNAMELEN = 0x3f -) - -type fiodgnameArg struct { - Len int32 - Buf *byte -} diff --git a/vendor/github.com/kr/pty/ztypes_freebsd_amd64.go b/vendor/github.com/kr/pty/ztypes_freebsd_amd64.go deleted file mode 100644 index 5fa102fcdf..0000000000 --- a/vendor/github.com/kr/pty/ztypes_freebsd_amd64.go +++ /dev/null @@ -1,14 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_freebsd.go - -package pty - -const ( - _C_SPECNAMELEN = 0x3f -) - -type fiodgnameArg struct { - Len int32 - Pad_cgo_0 [4]byte - Buf *byte -} diff --git a/vendor/github.com/kr/pty/ztypes_freebsd_arm.go b/vendor/github.com/kr/pty/ztypes_freebsd_arm.go deleted file mode 100644 index d9975374e3..0000000000 --- a/vendor/github.com/kr/pty/ztypes_freebsd_arm.go +++ /dev/null @@ -1,13 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_freebsd.go - -package pty - -const ( - _C_SPECNAMELEN = 0x3f -) - -type fiodgnameArg struct { - Len int32 - Buf *byte -} diff --git a/vendor/github.com/kr/pty/ztypes_mipsx.go b/vendor/github.com/kr/pty/ztypes_mipsx.go deleted file mode 100644 index f0ce74086a..0000000000 --- a/vendor/github.com/kr/pty/ztypes_mipsx.go +++ /dev/null @@ -1,12 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types.go - -// +build linux -// +build mips mipsle mips64 mips64le - -package pty - -type ( - _C_int int32 - _C_uint uint32 -) diff --git a/vendor/github.com/kr/pty/ztypes_openbsd_amd64.go b/vendor/github.com/kr/pty/ztypes_openbsd_amd64.go deleted file mode 100644 index e67051688f..0000000000 --- a/vendor/github.com/kr/pty/ztypes_openbsd_amd64.go +++ /dev/null @@ -1,13 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_openbsd.go - -package pty - -type ptmget struct { - Cfd int32 - Sfd int32 - Cn [16]int8 - Sn [16]int8 -} - -var ioctl_PTMGET = 0x40287401 diff --git a/vendor/github.com/kr/pty/ztypes_ppc64.go b/vendor/github.com/kr/pty/ztypes_ppc64.go deleted file mode 100644 index 4e1af84312..0000000000 --- a/vendor/github.com/kr/pty/ztypes_ppc64.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build ppc64 - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types.go - -package pty - -type ( - _C_int int32 - _C_uint uint32 -) diff --git a/vendor/github.com/kr/pty/ztypes_ppc64le.go b/vendor/github.com/kr/pty/ztypes_ppc64le.go deleted file mode 100644 index e6780f4e23..0000000000 --- a/vendor/github.com/kr/pty/ztypes_ppc64le.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build ppc64le - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types.go - -package pty - -type ( - _C_int int32 - _C_uint uint32 -) diff --git a/vendor/github.com/kr/pty/ztypes_s390x.go b/vendor/github.com/kr/pty/ztypes_s390x.go deleted file mode 100644 index a7452b61cb..0000000000 --- a/vendor/github.com/kr/pty/ztypes_s390x.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build s390x - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types.go - -package pty - -type ( - _C_int int32 - _C_uint uint32 -) diff --git a/vendor/modules.txt b/vendor/modules.txt index 4c408bc4ce..ba977e9e14 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -3,9 +3,6 @@ cel.dev/expr # cloud.google.com/go/kms v1.31.0 ## explicit; go 1.25.0 -# github.com/ActiveState/vt10x v1.3.1 -## explicit; go 1.13 -github.com/ActiveState/vt10x # github.com/AlecAivazis/survey/v2 v2.3.7 ## explicit; go 1.13 github.com/AlecAivazis/survey/v2 @@ -367,9 +364,6 @@ github.com/klauspost/compress/internal/le github.com/klauspost/compress/internal/snapref github.com/klauspost/compress/zstd github.com/klauspost/compress/zstd/internal/xxhash -# github.com/kr/pty v1.1.1 -## explicit -github.com/kr/pty # github.com/ktr0731/go-ansisgr v0.1.0 ## explicit; go 1.19 github.com/ktr0731/go-ansisgr