From 9c3cbc1733ec980bc0b90cc79cb268178ea9234b Mon Sep 17 00:00:00 2001 From: Will Norris Date: Sat, 15 Sep 2018 07:38:09 +0000 Subject: [PATCH] switch to use go module support versions of all dependencies remain the same, but now use `go mod` to manage them rather than govendor. This does result in a few extra files being checked in, since govendor would ignore non-build files and go mod does not. --- .gitignore | 4 + go.mod | 48 + go.sum | 92 ++ vendor/github.com/google/btree/btree_mem.go | 76 + .../rwcarlsen/goexif/exif/regen_regress.go | 79 + vendor/golang.org/x/image/draw/gen.go | 1404 +++++++++++++++++ vendor/golang.org/x/text/unicode/bidi/gen.go | 133 ++ .../x/text/unicode/bidi/gen_ranges.go | 57 + .../x/text/unicode/bidi/gen_trieval.go | 64 + .../x/text/unicode/norm/maketables.go | 976 ++++++++++++ .../golang.org/x/text/unicode/norm/triegen.go | 117 ++ .../internal/datastore/datastore_v3.proto | 0 vendor/modules.txt | 165 ++ vendor/vendor.json | 831 ---------- 14 files changed, 3215 insertions(+), 831 deletions(-) create mode 100644 go.mod create mode 100644 go.sum create mode 100644 vendor/github.com/google/btree/btree_mem.go create mode 100644 vendor/github.com/rwcarlsen/goexif/exif/regen_regress.go create mode 100644 vendor/golang.org/x/image/draw/gen.go create mode 100644 vendor/golang.org/x/text/unicode/bidi/gen.go create mode 100644 vendor/golang.org/x/text/unicode/bidi/gen_ranges.go create mode 100644 vendor/golang.org/x/text/unicode/bidi/gen_trieval.go create mode 100644 vendor/golang.org/x/text/unicode/norm/maketables.go create mode 100644 vendor/golang.org/x/text/unicode/norm/triegen.go mode change 100755 => 100644 vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto create mode 100644 vendor/modules.txt delete mode 100644 vendor/vendor.json diff --git a/.gitignore b/.gitignore index 527e68c..2b2d52b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,11 @@ build .goxc.local.json *.test +vendor/**/.travis.yml +vendor/**/.gitignore +vendor/**/.goxc.json vendor/**/AUTHORS vendor/**/CONTRIBUTORS vendor/**/Makefile +vendor/**/*_ZH.md vendor/**/*.sh diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..ba6692f --- /dev/null +++ b/go.mod @@ -0,0 +1,48 @@ +module willnorris.com/go/imageproxy + +require ( + cloud.google.com/go v0.0.0-20180131234750-2de512d2700d + github.com/Azure/azure-sdk-for-go v12.3.0-beta+incompatible // indirect + github.com/Azure/go-autorest v9.9.0+incompatible // indirect + github.com/PaulARoy/azurestoragecache v0.0.0-20170906084534-3c249a3ba788 + github.com/aws/aws-sdk-go v0.0.0-20180126231901-00cca3f093a8 + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dgrijalva/jwt-go v3.1.0+incompatible // indirect + github.com/die-net/lrucache v0.0.0-20171111232917-04b9315ab7a6 + github.com/disintegration/imaging v1.3.0 + github.com/dnaeon/go-vcr v0.0.0-20180814043457-aafff18a5cc2 // indirect + github.com/garyburd/redigo v1.5.0 + github.com/go-ini/ini v1.25.4 // indirect + github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect + github.com/golang/protobuf v1.0.0 // indirect + github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a // indirect + github.com/google/go-cmp v0.2.0 // indirect + github.com/googleapis/gax-go v2.0.0+incompatible // indirect + github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c // indirect + github.com/gregjones/httpcache v0.0.0-20171119193500-2bcd89a1743f + github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 // indirect + github.com/jtolds/gls v4.2.1+incompatible // indirect + github.com/kr/pretty v0.1.0 // indirect + github.com/marstr/guid v0.0.0-20170427235115-8bdf7d1a087c // indirect + github.com/muesli/smartcrop v0.0.0-20171215203440-9032446b30f6 + github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5 // indirect + github.com/peterbourgon/diskv v0.0.0-20171120014656-2973218375c3 + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/rwcarlsen/goexif v0.0.0-20141222211634-41dad3aa0833 + github.com/satori/go.uuid v0.0.0-20180103174451-36e9d2ebbde5 // indirect + github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf // indirect + github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a // indirect + github.com/stretchr/testify v1.2.2 // indirect + golang.org/x/image v0.0.0-20171214225156-12117c17ca67 + golang.org/x/net v0.0.0-20180201232540-b417086c80e9 // indirect + golang.org/x/oauth2 v0.0.0-20180126164932-a032972e2806 // indirect + golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f // indirect + golang.org/x/text v0.0.0-20171227012246-e19ae1496984 // indirect + google.golang.org/api v0.0.0-20180202000329-f7618f4b41ca // indirect + google.golang.org/appengine v0.0.0-20171212223047-5bee14b453b4 // indirect + google.golang.org/genproto v0.0.0-20180125080656-4eb30f4778ee // indirect + google.golang.org/grpc v0.0.0-20180201193814-f9628db66d14 // indirect + gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect + gopkg.in/yaml.v2 v2.2.1 // indirect + willnorris.com/go/gifresize v1.0.0 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..1402ec3 --- /dev/null +++ b/go.sum @@ -0,0 +1,92 @@ +cloud.google.com/go v0.0.0-20180131234750-2de512d2700d h1:Wj6Dk68uwFxqLKT1lV03UFLcfh5+HTLs+YCGlUc06M8= +cloud.google.com/go v0.0.0-20180131234750-2de512d2700d/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/Azure/azure-sdk-for-go v12.3.0-beta+incompatible h1:rrdWQEPInXBEqI10Nfu7FCp7BDdLSLWvkHwDWiXOEjw= +github.com/Azure/azure-sdk-for-go v12.3.0-beta+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-autorest v9.9.0+incompatible h1:U3u8yuM3dZPg6vjJ/Hl2hQlaP+WNOeSHY6Fk4g1e6Ps= +github.com/Azure/go-autorest v9.9.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/PaulARoy/azurestoragecache v0.0.0-20170906084534-3c249a3ba788 h1:OxWBmk9BZqWOHVs+hrElt/BiexDGcStcsADt0f4cUx8= +github.com/PaulARoy/azurestoragecache v0.0.0-20170906084534-3c249a3ba788/go.mod h1:lY1dZd8HBzJ10eqKERHn3CU59tfhzcAVb2c0ZhIWSOk= +github.com/aws/aws-sdk-go v0.0.0-20180126231901-00cca3f093a8 h1:xqzpCUtYUsmKRnKjKOmGh/kqa+zdhaCYuYAEwXzHCSY= +github.com/aws/aws-sdk-go v0.0.0-20180126231901-00cca3f093a8/go.mod h1:ZRmQr0FajVIyZ4ZzBYKG5P3ZqPz9IHG41ZoMu1ADI3k= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.1.0+incompatible h1:FFziAwDQQ2dz1XClWMkwvukur3evtZx7x/wMHKM1i20= +github.com/dgrijalva/jwt-go v3.1.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/die-net/lrucache v0.0.0-20171111232917-04b9315ab7a6 h1:UhONZXj9L+pdHs+qUEPMsQkG3BdhMHSCQk8KXRm83ho= +github.com/die-net/lrucache v0.0.0-20171111232917-04b9315ab7a6/go.mod h1:ew0MSjCVDdtGMjF3kzLK9hwdgF5mOE8SbYVF3Rc7mkU= +github.com/disintegration/imaging v1.3.0 h1:AihaBC+K3RHP7JL8scqq2GgNQhVzMcCYh7gJbAjAvpo= +github.com/disintegration/imaging v1.3.0/go.mod h1:9B/deIUIrliYkyMTuXJd6OUFLcrZ2tf+3Qlwnaf/CjU= +github.com/dnaeon/go-vcr v0.0.0-20180814043457-aafff18a5cc2 h1:G9/PqfhOrt8JXnw0DGTfVoOkKHDhOlEZqhE/cu+NvQM= +github.com/dnaeon/go-vcr v0.0.0-20180814043457-aafff18a5cc2/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/garyburd/redigo v1.5.0 h1:OcZhiwwjKtBe7TO4TlXpj/1E3I2RVg1uLxwMT4VFF5w= +github.com/garyburd/redigo v1.5.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= +github.com/go-ini/ini v1.25.4 h1:Mujh4R/dH6YL8bxuISne3xX2+qcQ9p0IxKAP6ExWoUo= +github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/protobuf v1.0.0 h1:lsek0oXi8iFE9L+EXARyHIjU5rlWIhhTkjDz3vHhWWQ= +github.com/golang/protobuf v1.0.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a h1:ZJu5NB1Bk5ms4vw0Xu4i+jD32SE9jQXyfnOvwhHqlT0= +github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/googleapis/gax-go v2.0.0+incompatible h1:j0GKcs05QVmm7yesiZq2+9cxHkNK9YM6zKx4D2qucQU= +github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= +github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c h1:16eHWuMGvCjSfgRJKqIzapE78onvvTbdi1rMkU00lZw= +github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gregjones/httpcache v0.0.0-20171119193500-2bcd89a1743f h1:kOkUP6rcVVqC+KlKKENKtgfFfJyDySYhqL9srXooghY= +github.com/gregjones/httpcache v0.0.0-20171119193500-2bcd89a1743f/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 h1:12VvqtR6Aowv3l/EQUlocDHW2Cp4G9WJVH7uyH8QFJE= +github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE= +github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/marstr/guid v0.0.0-20170427235115-8bdf7d1a087c h1:N7uWGS2fTwH/4BwxbHiJZNAFTSJ5yPU0emHsQWvkxEY= +github.com/marstr/guid v0.0.0-20170427235115-8bdf7d1a087c/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= +github.com/muesli/smartcrop v0.0.0-20171215203440-9032446b30f6 h1:m5kCp2hHRMu7z95f+aIK80l8N1tx+UXAqNoYpRS9v3o= +github.com/muesli/smartcrop v0.0.0-20171215203440-9032446b30f6/go.mod h1:i2fCI/UorTfgEpPPLWiFBv4pye+YAG78RwcQLUkocpI= +github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5 h1:BvoENQQU+fZ9uukda/RzCAL/191HHwJA5b13R6diVlY= +github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= +github.com/peterbourgon/diskv v0.0.0-20171120014656-2973218375c3 h1:ZKRE3mqKoxObHs5oWjLnA1WxXhmlDDAVuE0VsuLIoNk= +github.com/peterbourgon/diskv v0.0.0-20171120014656-2973218375c3/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rwcarlsen/goexif v0.0.0-20141222211634-41dad3aa0833 h1:jwa1bSL1nx8Yz7pOXkjXJCbKAffj5i2Rrl9ALRqSy6Y= +github.com/rwcarlsen/goexif v0.0.0-20141222211634-41dad3aa0833/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= +github.com/satori/go.uuid v0.0.0-20180103174451-36e9d2ebbde5 h1:tfcGHuraNSEY9xRb9ckCMqMD7xAjzrYI1WpD7DA+nz8= +github.com/satori/go.uuid v0.0.0-20180103174451-36e9d2ebbde5/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf h1:6V1qxN6Usn4jy8unvggSJz/NC790tefw8Zdy6OZS5co= +github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a h1:JSvGDIbmil4Ui/dDdFBExb7/cmkNjyX5F97oglmvCDo= +github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +golang.org/x/image v0.0.0-20171214225156-12117c17ca67 h1:L8S612DBEq9tpLTxczHuhrf5il+KEdSha8b5A5njQMc= +golang.org/x/image v0.0.0-20171214225156-12117c17ca67/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/net v0.0.0-20180201232540-b417086c80e9 h1:2srMuQrhUnBbRCQTYMFbAtec0kzANvdPwGdfLIXUodw= +golang.org/x/net v0.0.0-20180201232540-b417086c80e9/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/oauth2 v0.0.0-20180126164932-a032972e2806 h1:KZrxuLRRjPt8IU4XrMl45WQaER+p8WGu9cN8EekYVzM= +golang.org/x/oauth2 v0.0.0-20180126164932-a032972e2806/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/text v0.0.0-20171227012246-e19ae1496984 h1:ulYJn/BqO4fMRe1xAQzWjokgjsQLPpb21GltxXHI3fQ= +golang.org/x/text v0.0.0-20171227012246-e19ae1496984/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/api v0.0.0-20180202000329-f7618f4b41ca h1:bPw62MiF+sPyq2Apz3MT+qTY+hEgfVEUfkO4dVCK5oo= +google.golang.org/api v0.0.0-20180202000329-f7618f4b41ca/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +google.golang.org/appengine v0.0.0-20171212223047-5bee14b453b4 h1:gggB/NnRSjJj9dpMAaxm4mMTFai1QLGL39CGXmQvr+s= +google.golang.org/appengine v0.0.0-20171212223047-5bee14b453b4/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/genproto v0.0.0-20180125080656-4eb30f4778ee h1:z84t4XBifcyxT9HA96QiKwGaWYiO7vfoqu7vWoa6lQk= +google.golang.org/genproto v0.0.0-20180125080656-4eb30f4778ee/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/grpc v0.0.0-20180201193814-f9628db66d14 h1:y8LqgDoOxiN/KHkwtrvzgzZtDvk5EAQCGBeWgpRUt1Q= +google.golang.org/grpc v0.0.0-20180201193814-f9628db66d14/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +willnorris.com/go/gifresize v1.0.0 h1:KkdTSrFE1mhzAgTO8/ukK6ZP4SVptL4G3d1lx5X5qMw= +willnorris.com/go/gifresize v1.0.0/go.mod h1:eBM8gogBGCcaH603vxSpnfjwXIpq6nmnj/jauBDKtAk= diff --git a/vendor/github.com/google/btree/btree_mem.go b/vendor/github.com/google/btree/btree_mem.go new file mode 100644 index 0000000..cb95b7f --- /dev/null +++ b/vendor/github.com/google/btree/btree_mem.go @@ -0,0 +1,76 @@ +// Copyright 2014 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +build ignore + +// This binary compares memory usage between btree and gollrb. +package main + +import ( + "flag" + "fmt" + "math/rand" + "runtime" + "time" + + "github.com/google/btree" + "github.com/petar/GoLLRB/llrb" +) + +var ( + size = flag.Int("size", 1000000, "size of the tree to build") + degree = flag.Int("degree", 8, "degree of btree") + gollrb = flag.Bool("llrb", false, "use llrb instead of btree") +) + +func main() { + flag.Parse() + vals := rand.Perm(*size) + var t, v interface{} + v = vals + var stats runtime.MemStats + for i := 0; i < 10; i++ { + runtime.GC() + } + fmt.Println("-------- BEFORE ----------") + runtime.ReadMemStats(&stats) + fmt.Printf("%+v\n", stats) + start := time.Now() + if *gollrb { + tr := llrb.New() + for _, v := range vals { + tr.ReplaceOrInsert(llrb.Int(v)) + } + t = tr // keep it around + } else { + tr := btree.New(*degree) + for _, v := range vals { + tr.ReplaceOrInsert(btree.Int(v)) + } + t = tr // keep it around + } + fmt.Printf("%v inserts in %v\n", *size, time.Since(start)) + fmt.Println("-------- AFTER ----------") + runtime.ReadMemStats(&stats) + fmt.Printf("%+v\n", stats) + for i := 0; i < 10; i++ { + runtime.GC() + } + fmt.Println("-------- AFTER GC ----------") + runtime.ReadMemStats(&stats) + fmt.Printf("%+v\n", stats) + if t == v { + fmt.Println("to make sure vals and tree aren't GC'd") + } +} diff --git a/vendor/github.com/rwcarlsen/goexif/exif/regen_regress.go b/vendor/github.com/rwcarlsen/goexif/exif/regen_regress.go new file mode 100644 index 0000000..17bac52 --- /dev/null +++ b/vendor/github.com/rwcarlsen/goexif/exif/regen_regress.go @@ -0,0 +1,79 @@ +// +build ignore + +package main + +import ( + "flag" + "fmt" + "io" + "log" + "os" + "path/filepath" + "strings" + + "github.com/rwcarlsen/goexif/exif" + "github.com/rwcarlsen/goexif/tiff" +) + +func main() { + flag.Parse() + fname := flag.Arg(0) + + dst, err := os.Create(fname) + if err != nil { + log.Fatal(err) + } + defer dst.Close() + + dir, err := os.Open("samples") + if err != nil { + log.Fatal(err) + } + defer dir.Close() + + names, err := dir.Readdirnames(0) + if err != nil { + log.Fatal(err) + } + for i, name := range names { + names[i] = filepath.Join("samples", name) + } + makeExpected(names, dst) +} + +func makeExpected(files []string, w io.Writer) { + fmt.Fprintf(w, "package exif\n\n") + fmt.Fprintf(w, "var regressExpected = map[string]map[FieldName]string{\n") + + for _, name := range files { + f, err := os.Open(name) + if err != nil { + continue + } + + x, err := exif.Decode(f) + if err != nil { + f.Close() + continue + } + + fmt.Fprintf(w, "\"%v\": map[FieldName]string{\n", filepath.Base(name)) + x.Walk(®resswalk{w}) + fmt.Fprintf(w, "},\n") + f.Close() + } + fmt.Fprintf(w, "}") +} + +type regresswalk struct { + wr io.Writer +} + +func (w *regresswalk) Walk(name exif.FieldName, tag *tiff.Tag) error { + if strings.HasPrefix(string(name), exif.UnknownPrefix) { + fmt.Fprintf(w.wr, "\"%v\": `%v`,\n", name, tag.String()) + } else { + fmt.Fprintf(w.wr, "%v: `%v`,\n", name, tag.String()) + } + return nil +} diff --git a/vendor/golang.org/x/image/draw/gen.go b/vendor/golang.org/x/image/draw/gen.go new file mode 100644 index 0000000..822bb6a --- /dev/null +++ b/vendor/golang.org/x/image/draw/gen.go @@ -0,0 +1,1404 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +package main + +import ( + "bytes" + "flag" + "fmt" + "go/format" + "io/ioutil" + "log" + "os" + "strings" +) + +var debug = flag.Bool("debug", false, "") + +func main() { + flag.Parse() + + w := new(bytes.Buffer) + w.WriteString("// generated by \"go run gen.go\". DO NOT EDIT.\n\n" + + "package draw\n\nimport (\n" + + "\"image\"\n" + + "\"image/color\"\n" + + "\"math\"\n" + + "\n" + + "\"golang.org/x/image/math/f64\"\n" + + ")\n") + + gen(w, "nnInterpolator", codeNNScaleLeaf, codeNNTransformLeaf) + gen(w, "ablInterpolator", codeABLScaleLeaf, codeABLTransformLeaf) + genKernel(w) + + if *debug { + os.Stdout.Write(w.Bytes()) + return + } + out, err := format.Source(w.Bytes()) + if err != nil { + log.Fatal(err) + } + if err := ioutil.WriteFile("impl.go", out, 0660); err != nil { + log.Fatal(err) + } +} + +var ( + // dsTypes are the (dst image type, src image type) pairs to generate + // scale_DType_SType implementations for. The last element in the slice + // should be the fallback pair ("Image", "image.Image"). + // + // TODO: add *image.CMYK src type after Go 1.5 is released. + // An *image.CMYK is also alwaysOpaque. + dsTypes = []struct{ dType, sType string }{ + {"*image.RGBA", "*image.Gray"}, + {"*image.RGBA", "*image.NRGBA"}, + {"*image.RGBA", "*image.RGBA"}, + {"*image.RGBA", "*image.YCbCr"}, + {"*image.RGBA", "image.Image"}, + {"Image", "image.Image"}, + } + dTypes, sTypes []string + sTypesForDType = map[string][]string{} + subsampleRatios = []string{ + "444", + "422", + "420", + "440", + } + ops = []string{"Over", "Src"} + // alwaysOpaque are those image.Image implementations that are always + // opaque. For these types, Over is equivalent to the faster Src, in the + // absence of a source mask. + alwaysOpaque = map[string]bool{ + "*image.Gray": true, + "*image.YCbCr": true, + } +) + +func init() { + dTypesSeen := map[string]bool{} + sTypesSeen := map[string]bool{} + for _, t := range dsTypes { + if !sTypesSeen[t.sType] { + sTypesSeen[t.sType] = true + sTypes = append(sTypes, t.sType) + } + if !dTypesSeen[t.dType] { + dTypesSeen[t.dType] = true + dTypes = append(dTypes, t.dType) + } + sTypesForDType[t.dType] = append(sTypesForDType[t.dType], t.sType) + } + sTypesForDType["anyDType"] = sTypes +} + +type data struct { + dType string + sType string + sratio string + receiver string + op string +} + +func gen(w *bytes.Buffer, receiver string, codes ...string) { + expn(w, codeRoot, &data{receiver: receiver}) + for _, code := range codes { + for _, t := range dsTypes { + for _, op := range ops { + if op == "Over" && alwaysOpaque[t.sType] { + continue + } + expn(w, code, &data{ + dType: t.dType, + sType: t.sType, + receiver: receiver, + op: op, + }) + } + } + } +} + +func genKernel(w *bytes.Buffer) { + expn(w, codeKernelRoot, &data{}) + for _, sType := range sTypes { + expn(w, codeKernelScaleLeafX, &data{ + sType: sType, + }) + } + for _, dType := range dTypes { + for _, op := range ops { + expn(w, codeKernelScaleLeafY, &data{ + dType: dType, + op: op, + }) + } + } + for _, t := range dsTypes { + for _, op := range ops { + if op == "Over" && alwaysOpaque[t.sType] { + continue + } + expn(w, codeKernelTransformLeaf, &data{ + dType: t.dType, + sType: t.sType, + op: op, + }) + } + } +} + +func expn(w *bytes.Buffer, code string, d *data) { + if d.sType == "*image.YCbCr" && d.sratio == "" { + for _, sratio := range subsampleRatios { + e := *d + e.sratio = sratio + expn(w, code, &e) + } + return + } + + for _, line := range strings.Split(code, "\n") { + line = expnLine(line, d) + if line == ";" { + continue + } + fmt.Fprintln(w, line) + } +} + +func expnLine(line string, d *data) string { + for { + i := strings.IndexByte(line, '$') + if i < 0 { + break + } + prefix, s := line[:i], line[i+1:] + + i = len(s) + for j, c := range s { + if !('A' <= c && c <= 'Z' || 'a' <= c && c <= 'z') { + i = j + break + } + } + dollar, suffix := s[:i], s[i:] + + e := expnDollar(prefix, dollar, suffix, d) + if e == "" { + log.Fatalf("couldn't expand %q", line) + } + line = e + } + return line +} + +// expnDollar expands a "$foo" fragment in a line of generated code. It returns +// the empty string if there was a problem. It returns ";" if the generated +// code is a no-op. +func expnDollar(prefix, dollar, suffix string, d *data) string { + switch dollar { + case "dType": + return prefix + d.dType + suffix + case "dTypeRN": + return prefix + relName(d.dType) + suffix + case "sratio": + return prefix + d.sratio + suffix + case "sType": + return prefix + d.sType + suffix + case "sTypeRN": + return prefix + relName(d.sType) + suffix + case "receiver": + return prefix + d.receiver + suffix + case "op": + return prefix + d.op + suffix + + case "switch": + return expnSwitch("", "", true, suffix) + case "switchD": + return expnSwitch("", "", false, suffix) + case "switchS": + return expnSwitch("", "anyDType", false, suffix) + + case "preOuter": + switch d.dType { + default: + return ";" + case "Image": + s := "" + if d.sType == "image.Image" { + s = "srcMask, smp := opts.SrcMask, opts.SrcMaskP\n" + } + return s + + "dstMask, dmp := opts.DstMask, opts.DstMaskP\n" + + "dstColorRGBA64 := &color.RGBA64{}\n" + + "dstColor := color.Color(dstColorRGBA64)" + } + + case "preInner": + switch d.dType { + default: + return ";" + case "*image.RGBA": + return "d := " + pixOffset("dst", "dr.Min.X+adr.Min.X", "dr.Min.Y+int(dy)", "*4", "*dst.Stride") + } + + case "preKernelOuter": + switch d.sType { + default: + return ";" + case "image.Image": + return "srcMask, smp := opts.SrcMask, opts.SrcMaskP" + } + + case "preKernelInner": + switch d.dType { + default: + return ";" + case "*image.RGBA": + return "d := " + pixOffset("dst", "dr.Min.X+int(dx)", "dr.Min.Y+adr.Min.Y", "*4", "*dst.Stride") + } + + case "blend": + args, _ := splitArgs(suffix) + if len(args) != 4 { + return "" + } + switch d.sType { + default: + return argf(args, ""+ + "$3r = $0*$1r + $2*$3r\n"+ + "$3g = $0*$1g + $2*$3g\n"+ + "$3b = $0*$1b + $2*$3b\n"+ + "$3a = $0*$1a + $2*$3a", + ) + case "*image.Gray": + return argf(args, ""+ + "$3r = $0*$1r + $2*$3r", + ) + case "*image.YCbCr": + return argf(args, ""+ + "$3r = $0*$1r + $2*$3r\n"+ + "$3g = $0*$1g + $2*$3g\n"+ + "$3b = $0*$1b + $2*$3b", + ) + } + + case "clampToAlpha": + if alwaysOpaque[d.sType] { + return ";" + } + // Go uses alpha-premultiplied color. The naive computation can lead to + // invalid colors, e.g. red > alpha, when some weights are negative. + return ` + if pr > pa { + pr = pa + } + if pg > pa { + pg = pa + } + if pb > pa { + pb = pa + } + ` + + case "convFtou": + args, _ := splitArgs(suffix) + if len(args) != 2 { + return "" + } + + switch d.sType { + default: + return argf(args, ""+ + "$0r := uint32($1r)\n"+ + "$0g := uint32($1g)\n"+ + "$0b := uint32($1b)\n"+ + "$0a := uint32($1a)", + ) + case "*image.Gray": + return argf(args, ""+ + "$0r := uint32($1r)", + ) + case "*image.YCbCr": + return argf(args, ""+ + "$0r := uint32($1r)\n"+ + "$0g := uint32($1g)\n"+ + "$0b := uint32($1b)", + ) + } + + case "outputu": + args, _ := splitArgs(suffix) + if len(args) != 3 { + return "" + } + + switch d.op { + case "Over": + switch d.dType { + default: + log.Fatalf("bad dType %q", d.dType) + case "Image": + return argf(args, ""+ + "qr, qg, qb, qa := dst.At($0, $1).RGBA()\n"+ + "if dstMask != nil {\n"+ + " _, _, _, ma := dstMask.At(dmp.X + $0, dmp.Y + $1).RGBA()\n"+ + " $2r = $2r * ma / 0xffff\n"+ + " $2g = $2g * ma / 0xffff\n"+ + " $2b = $2b * ma / 0xffff\n"+ + " $2a = $2a * ma / 0xffff\n"+ + "}\n"+ + "$2a1 := 0xffff - $2a\n"+ + "dstColorRGBA64.R = uint16(qr*$2a1/0xffff + $2r)\n"+ + "dstColorRGBA64.G = uint16(qg*$2a1/0xffff + $2g)\n"+ + "dstColorRGBA64.B = uint16(qb*$2a1/0xffff + $2b)\n"+ + "dstColorRGBA64.A = uint16(qa*$2a1/0xffff + $2a)\n"+ + "dst.Set($0, $1, dstColor)", + ) + case "*image.RGBA": + return argf(args, ""+ + "$2a1 := (0xffff - $2a) * 0x101\n"+ + "dst.Pix[d+0] = uint8((uint32(dst.Pix[d+0])*$2a1/0xffff + $2r) >> 8)\n"+ + "dst.Pix[d+1] = uint8((uint32(dst.Pix[d+1])*$2a1/0xffff + $2g) >> 8)\n"+ + "dst.Pix[d+2] = uint8((uint32(dst.Pix[d+2])*$2a1/0xffff + $2b) >> 8)\n"+ + "dst.Pix[d+3] = uint8((uint32(dst.Pix[d+3])*$2a1/0xffff + $2a) >> 8)", + ) + } + + case "Src": + switch d.dType { + default: + log.Fatalf("bad dType %q", d.dType) + case "Image": + return argf(args, ""+ + "if dstMask != nil {\n"+ + " qr, qg, qb, qa := dst.At($0, $1).RGBA()\n"+ + " _, _, _, ma := dstMask.At(dmp.X + $0, dmp.Y + $1).RGBA()\n"+ + " pr = pr * ma / 0xffff\n"+ + " pg = pg * ma / 0xffff\n"+ + " pb = pb * ma / 0xffff\n"+ + " pa = pa * ma / 0xffff\n"+ + " $2a1 := 0xffff - ma\n"+ // Note that this is ma, not $2a. + " dstColorRGBA64.R = uint16(qr*$2a1/0xffff + $2r)\n"+ + " dstColorRGBA64.G = uint16(qg*$2a1/0xffff + $2g)\n"+ + " dstColorRGBA64.B = uint16(qb*$2a1/0xffff + $2b)\n"+ + " dstColorRGBA64.A = uint16(qa*$2a1/0xffff + $2a)\n"+ + " dst.Set($0, $1, dstColor)\n"+ + "} else {\n"+ + " dstColorRGBA64.R = uint16($2r)\n"+ + " dstColorRGBA64.G = uint16($2g)\n"+ + " dstColorRGBA64.B = uint16($2b)\n"+ + " dstColorRGBA64.A = uint16($2a)\n"+ + " dst.Set($0, $1, dstColor)\n"+ + "}", + ) + case "*image.RGBA": + switch d.sType { + default: + return argf(args, ""+ + "dst.Pix[d+0] = uint8($2r >> 8)\n"+ + "dst.Pix[d+1] = uint8($2g >> 8)\n"+ + "dst.Pix[d+2] = uint8($2b >> 8)\n"+ + "dst.Pix[d+3] = uint8($2a >> 8)", + ) + case "*image.Gray": + return argf(args, ""+ + "out := uint8($2r >> 8)\n"+ + "dst.Pix[d+0] = out\n"+ + "dst.Pix[d+1] = out\n"+ + "dst.Pix[d+2] = out\n"+ + "dst.Pix[d+3] = 0xff", + ) + case "*image.YCbCr": + return argf(args, ""+ + "dst.Pix[d+0] = uint8($2r >> 8)\n"+ + "dst.Pix[d+1] = uint8($2g >> 8)\n"+ + "dst.Pix[d+2] = uint8($2b >> 8)\n"+ + "dst.Pix[d+3] = 0xff", + ) + } + } + } + + case "outputf": + args, _ := splitArgs(suffix) + if len(args) != 5 { + return "" + } + ret := "" + + switch d.op { + case "Over": + switch d.dType { + default: + log.Fatalf("bad dType %q", d.dType) + case "Image": + ret = argf(args, ""+ + "qr, qg, qb, qa := dst.At($0, $1).RGBA()\n"+ + "$3r0 := uint32($2($3r * $4))\n"+ + "$3g0 := uint32($2($3g * $4))\n"+ + "$3b0 := uint32($2($3b * $4))\n"+ + "$3a0 := uint32($2($3a * $4))\n"+ + "if dstMask != nil {\n"+ + " _, _, _, ma := dstMask.At(dmp.X + $0, dmp.Y + $1).RGBA()\n"+ + " $3r0 = $3r0 * ma / 0xffff\n"+ + " $3g0 = $3g0 * ma / 0xffff\n"+ + " $3b0 = $3b0 * ma / 0xffff\n"+ + " $3a0 = $3a0 * ma / 0xffff\n"+ + "}\n"+ + "$3a1 := 0xffff - $3a0\n"+ + "dstColorRGBA64.R = uint16(qr*$3a1/0xffff + $3r0)\n"+ + "dstColorRGBA64.G = uint16(qg*$3a1/0xffff + $3g0)\n"+ + "dstColorRGBA64.B = uint16(qb*$3a1/0xffff + $3b0)\n"+ + "dstColorRGBA64.A = uint16(qa*$3a1/0xffff + $3a0)\n"+ + "dst.Set($0, $1, dstColor)", + ) + case "*image.RGBA": + ret = argf(args, ""+ + "$3r0 := uint32($2($3r * $4))\n"+ + "$3g0 := uint32($2($3g * $4))\n"+ + "$3b0 := uint32($2($3b * $4))\n"+ + "$3a0 := uint32($2($3a * $4))\n"+ + "$3a1 := (0xffff - uint32($3a0)) * 0x101\n"+ + "dst.Pix[d+0] = uint8((uint32(dst.Pix[d+0])*$3a1/0xffff + $3r0) >> 8)\n"+ + "dst.Pix[d+1] = uint8((uint32(dst.Pix[d+1])*$3a1/0xffff + $3g0) >> 8)\n"+ + "dst.Pix[d+2] = uint8((uint32(dst.Pix[d+2])*$3a1/0xffff + $3b0) >> 8)\n"+ + "dst.Pix[d+3] = uint8((uint32(dst.Pix[d+3])*$3a1/0xffff + $3a0) >> 8)", + ) + } + + case "Src": + switch d.dType { + default: + log.Fatalf("bad dType %q", d.dType) + case "Image": + ret = argf(args, ""+ + "if dstMask != nil {\n"+ + " qr, qg, qb, qa := dst.At($0, $1).RGBA()\n"+ + " _, _, _, ma := dstMask.At(dmp.X + $0, dmp.Y + $1).RGBA()\n"+ + " pr := uint32($2($3r * $4)) * ma / 0xffff\n"+ + " pg := uint32($2($3g * $4)) * ma / 0xffff\n"+ + " pb := uint32($2($3b * $4)) * ma / 0xffff\n"+ + " pa := uint32($2($3a * $4)) * ma / 0xffff\n"+ + " pa1 := 0xffff - ma\n"+ // Note that this is ma, not pa. + " dstColorRGBA64.R = uint16(qr*pa1/0xffff + pr)\n"+ + " dstColorRGBA64.G = uint16(qg*pa1/0xffff + pg)\n"+ + " dstColorRGBA64.B = uint16(qb*pa1/0xffff + pb)\n"+ + " dstColorRGBA64.A = uint16(qa*pa1/0xffff + pa)\n"+ + " dst.Set($0, $1, dstColor)\n"+ + "} else {\n"+ + " dstColorRGBA64.R = $2($3r * $4)\n"+ + " dstColorRGBA64.G = $2($3g * $4)\n"+ + " dstColorRGBA64.B = $2($3b * $4)\n"+ + " dstColorRGBA64.A = $2($3a * $4)\n"+ + " dst.Set($0, $1, dstColor)\n"+ + "}", + ) + case "*image.RGBA": + switch d.sType { + default: + ret = argf(args, ""+ + "dst.Pix[d+0] = uint8($2($3r * $4) >> 8)\n"+ + "dst.Pix[d+1] = uint8($2($3g * $4) >> 8)\n"+ + "dst.Pix[d+2] = uint8($2($3b * $4) >> 8)\n"+ + "dst.Pix[d+3] = uint8($2($3a * $4) >> 8)", + ) + case "*image.Gray": + ret = argf(args, ""+ + "out := uint8($2($3r * $4) >> 8)\n"+ + "dst.Pix[d+0] = out\n"+ + "dst.Pix[d+1] = out\n"+ + "dst.Pix[d+2] = out\n"+ + "dst.Pix[d+3] = 0xff", + ) + case "*image.YCbCr": + ret = argf(args, ""+ + "dst.Pix[d+0] = uint8($2($3r * $4) >> 8)\n"+ + "dst.Pix[d+1] = uint8($2($3g * $4) >> 8)\n"+ + "dst.Pix[d+2] = uint8($2($3b * $4) >> 8)\n"+ + "dst.Pix[d+3] = 0xff", + ) + } + } + } + + return strings.Replace(ret, " * 1)", ")", -1) + + case "srcf", "srcu": + lhs, eqOp := splitEq(prefix) + if lhs == "" { + return "" + } + args, extra := splitArgs(suffix) + if len(args) != 2 { + return "" + } + + tmp := "" + if dollar == "srcf" { + tmp = "u" + } + + // TODO: there's no need to multiply by 0x101 in the switch below if + // the next thing we're going to do is shift right by 8. + + buf := new(bytes.Buffer) + switch d.sType { + default: + log.Fatalf("bad sType %q", d.sType) + case "image.Image": + fmt.Fprintf(buf, ""+ + "%sr%s, %sg%s, %sb%s, %sa%s := src.At(%s, %s).RGBA()\n", + lhs, tmp, lhs, tmp, lhs, tmp, lhs, tmp, args[0], args[1], + ) + if d.dType == "" || d.dType == "Image" { + fmt.Fprintf(buf, ""+ + "if srcMask != nil {\n"+ + " _, _, _, ma := srcMask.At(smp.X+%s, smp.Y+%s).RGBA()\n"+ + " %sr%s = %sr%s * ma / 0xffff\n"+ + " %sg%s = %sg%s * ma / 0xffff\n"+ + " %sb%s = %sb%s * ma / 0xffff\n"+ + " %sa%s = %sa%s * ma / 0xffff\n"+ + "}\n", + args[0], args[1], + lhs, tmp, lhs, tmp, + lhs, tmp, lhs, tmp, + lhs, tmp, lhs, tmp, + lhs, tmp, lhs, tmp, + ) + } + case "*image.Gray": + fmt.Fprintf(buf, ""+ + "%si := %s\n"+ + "%sr%s := uint32(src.Pix[%si]) * 0x101\n", + lhs, pixOffset("src", args[0], args[1], "", "*src.Stride"), + lhs, tmp, lhs, + ) + case "*image.NRGBA": + fmt.Fprintf(buf, ""+ + "%si := %s\n"+ + "%sa%s := uint32(src.Pix[%si+3]) * 0x101\n"+ + "%sr%s := uint32(src.Pix[%si+0]) * %sa%s / 0xff\n"+ + "%sg%s := uint32(src.Pix[%si+1]) * %sa%s / 0xff\n"+ + "%sb%s := uint32(src.Pix[%si+2]) * %sa%s / 0xff\n", + lhs, pixOffset("src", args[0], args[1], "*4", "*src.Stride"), + lhs, tmp, lhs, + lhs, tmp, lhs, lhs, tmp, + lhs, tmp, lhs, lhs, tmp, + lhs, tmp, lhs, lhs, tmp, + ) + case "*image.RGBA": + fmt.Fprintf(buf, ""+ + "%si := %s\n"+ + "%sr%s := uint32(src.Pix[%si+0]) * 0x101\n"+ + "%sg%s := uint32(src.Pix[%si+1]) * 0x101\n"+ + "%sb%s := uint32(src.Pix[%si+2]) * 0x101\n"+ + "%sa%s := uint32(src.Pix[%si+3]) * 0x101\n", + lhs, pixOffset("src", args[0], args[1], "*4", "*src.Stride"), + lhs, tmp, lhs, + lhs, tmp, lhs, + lhs, tmp, lhs, + lhs, tmp, lhs, + ) + case "*image.YCbCr": + fmt.Fprintf(buf, ""+ + "%si := %s\n"+ + "%sj := %s\n"+ + "%s\n", + lhs, pixOffset("src", args[0], args[1], "", "*src.YStride"), + lhs, cOffset(args[0], args[1], d.sratio), + ycbcrToRGB(lhs, tmp), + ) + } + + if dollar == "srcf" { + switch d.sType { + default: + fmt.Fprintf(buf, ""+ + "%sr %s float64(%sru)%s\n"+ + "%sg %s float64(%sgu)%s\n"+ + "%sb %s float64(%sbu)%s\n"+ + "%sa %s float64(%sau)%s\n", + lhs, eqOp, lhs, extra, + lhs, eqOp, lhs, extra, + lhs, eqOp, lhs, extra, + lhs, eqOp, lhs, extra, + ) + case "*image.Gray": + fmt.Fprintf(buf, ""+ + "%sr %s float64(%sru)%s\n", + lhs, eqOp, lhs, extra, + ) + case "*image.YCbCr": + fmt.Fprintf(buf, ""+ + "%sr %s float64(%sru)%s\n"+ + "%sg %s float64(%sgu)%s\n"+ + "%sb %s float64(%sbu)%s\n", + lhs, eqOp, lhs, extra, + lhs, eqOp, lhs, extra, + lhs, eqOp, lhs, extra, + ) + } + } + + return strings.TrimSpace(buf.String()) + + case "tweakD": + if d.dType == "*image.RGBA" { + return "d += dst.Stride" + } + return ";" + + case "tweakDx": + if d.dType == "*image.RGBA" { + return strings.Replace(prefix, "dx++", "dx, d = dx+1, d+4", 1) + } + return prefix + + case "tweakDy": + if d.dType == "*image.RGBA" { + return strings.Replace(prefix, "for dy, s", "for _, s", 1) + } + return prefix + + case "tweakP": + switch d.sType { + case "*image.Gray": + if strings.HasPrefix(strings.TrimSpace(prefix), "pa * ") { + return "1," + } + return "pr," + case "*image.YCbCr": + if strings.HasPrefix(strings.TrimSpace(prefix), "pa * ") { + return "1," + } + } + return prefix + + case "tweakPr": + if d.sType == "*image.Gray" { + return "pr *= s.invTotalWeightFFFF" + } + return ";" + + case "tweakVarP": + switch d.sType { + case "*image.Gray": + return strings.Replace(prefix, "var pr, pg, pb, pa", "var pr", 1) + case "*image.YCbCr": + return strings.Replace(prefix, "var pr, pg, pb, pa", "var pr, pg, pb", 1) + } + return prefix + } + return "" +} + +func expnSwitch(op, dType string, expandBoth bool, template string) string { + if op == "" && dType != "anyDType" { + lines := []string{"switch op {"} + for _, op = range ops { + lines = append(lines, + fmt.Sprintf("case %s:", op), + expnSwitch(op, dType, expandBoth, template), + ) + } + lines = append(lines, "}") + return strings.Join(lines, "\n") + } + + switchVar := "dst" + if dType != "" { + switchVar = "src" + } + lines := []string{fmt.Sprintf("switch %s := %s.(type) {", switchVar, switchVar)} + + fallback, values := "Image", dTypes + if dType != "" { + fallback, values = "image.Image", sTypesForDType[dType] + } + for _, v := range values { + if dType != "" { + // v is the sType. Skip those always-opaque sTypes, where Over is + // equivalent to Src. + if op == "Over" && alwaysOpaque[v] { + continue + } + } + + if v == fallback { + lines = append(lines, "default:") + } else { + lines = append(lines, fmt.Sprintf("case %s:", v)) + } + + if dType != "" { + if v == "*image.YCbCr" { + lines = append(lines, expnSwitchYCbCr(op, dType, template)) + } else { + lines = append(lines, expnLine(template, &data{dType: dType, sType: v, op: op})) + } + } else if !expandBoth { + lines = append(lines, expnLine(template, &data{dType: v, op: op})) + } else { + lines = append(lines, expnSwitch(op, v, false, template)) + } + } + + lines = append(lines, "}") + return strings.Join(lines, "\n") +} + +func expnSwitchYCbCr(op, dType, template string) string { + lines := []string{ + "switch src.SubsampleRatio {", + "default:", + expnLine(template, &data{dType: dType, sType: "image.Image", op: op}), + } + for _, sratio := range subsampleRatios { + lines = append(lines, + fmt.Sprintf("case image.YCbCrSubsampleRatio%s:", sratio), + expnLine(template, &data{dType: dType, sType: "*image.YCbCr", sratio: sratio, op: op}), + ) + } + lines = append(lines, "}") + return strings.Join(lines, "\n") +} + +func argf(args []string, s string) string { + if len(args) > 9 { + panic("too many args") + } + for i, a := range args { + old := fmt.Sprintf("$%d", i) + s = strings.Replace(s, old, a, -1) + } + return s +} + +func pixOffset(m, x, y, xstride, ystride string) string { + return fmt.Sprintf("(%s-%s.Rect.Min.Y)%s + (%s-%s.Rect.Min.X)%s", y, m, ystride, x, m, xstride) +} + +func cOffset(x, y, sratio string) string { + switch sratio { + case "444": + return fmt.Sprintf("( %s - src.Rect.Min.Y )*src.CStride + ( %s - src.Rect.Min.X )", y, x) + case "422": + return fmt.Sprintf("( %s - src.Rect.Min.Y )*src.CStride + ((%s)/2 - src.Rect.Min.X/2)", y, x) + case "420": + return fmt.Sprintf("((%s)/2 - src.Rect.Min.Y/2)*src.CStride + ((%s)/2 - src.Rect.Min.X/2)", y, x) + case "440": + return fmt.Sprintf("((%s)/2 - src.Rect.Min.Y/2)*src.CStride + ( %s - src.Rect.Min.X )", y, x) + } + return fmt.Sprintf("unsupported sratio %q", sratio) +} + +func ycbcrToRGB(lhs, tmp string) string { + s := ` + // This is an inline version of image/color/ycbcr.go's YCbCr.RGBA method. + $yy1 := int(src.Y[$i]) * 0x10101 + $cb1 := int(src.Cb[$j]) - 128 + $cr1 := int(src.Cr[$j]) - 128 + $r@ := ($yy1 + 91881*$cr1) >> 8 + $g@ := ($yy1 - 22554*$cb1 - 46802*$cr1) >> 8 + $b@ := ($yy1 + 116130*$cb1) >> 8 + if $r@ < 0 { + $r@ = 0 + } else if $r@ > 0xffff { + $r@ = 0xffff + } + if $g@ < 0 { + $g@ = 0 + } else if $g@ > 0xffff { + $g@ = 0xffff + } + if $b@ < 0 { + $b@ = 0 + } else if $b@ > 0xffff { + $b@ = 0xffff + } + ` + s = strings.Replace(s, "$", lhs, -1) + s = strings.Replace(s, "@", tmp, -1) + return s +} + +func split(s, sep string) (string, string) { + if i := strings.Index(s, sep); i >= 0 { + return strings.TrimSpace(s[:i]), strings.TrimSpace(s[i+len(sep):]) + } + return "", "" +} + +func splitEq(s string) (lhs, eqOp string) { + s = strings.TrimSpace(s) + if lhs, _ = split(s, ":="); lhs != "" { + return lhs, ":=" + } + if lhs, _ = split(s, "+="); lhs != "" { + return lhs, "+=" + } + return "", "" +} + +func splitArgs(s string) (args []string, extra string) { + s = strings.TrimSpace(s) + if s == "" || s[0] != '[' { + return nil, "" + } + s = s[1:] + + i := strings.IndexByte(s, ']') + if i < 0 { + return nil, "" + } + args, extra = strings.Split(s[:i], ","), s[i+1:] + for i := range args { + args[i] = strings.TrimSpace(args[i]) + } + return args, extra +} + +func relName(s string) string { + if i := strings.LastIndex(s, "."); i >= 0 { + return s[i+1:] + } + return s +} + +const ( + codeRoot = ` + func (z $receiver) Scale(dst Image, dr image.Rectangle, src image.Image, sr image.Rectangle, op Op, opts *Options) { + // Try to simplify a Scale to a Copy when DstMask is not specified. + // If DstMask is not nil, Copy will call Scale back with same dr and sr, and cause stack overflow. + if dr.Size() == sr.Size() && (opts == nil || opts.DstMask == nil) { + Copy(dst, dr.Min, src, sr, op, opts) + return + } + + var o Options + if opts != nil { + o = *opts + } + + // adr is the affected destination pixels. + adr := dst.Bounds().Intersect(dr) + adr, o.DstMask = clipAffectedDestRect(adr, o.DstMask, o.DstMaskP) + if adr.Empty() || sr.Empty() { + return + } + // Make adr relative to dr.Min. + adr = adr.Sub(dr.Min) + if op == Over && o.SrcMask == nil && opaque(src) { + op = Src + } + + // sr is the source pixels. If it extends beyond the src bounds, + // we cannot use the type-specific fast paths, as they access + // the Pix fields directly without bounds checking. + // + // Similarly, the fast paths assume that the masks are nil. + if o.DstMask != nil || o.SrcMask != nil || !sr.In(src.Bounds()) { + switch op { + case Over: + z.scale_Image_Image_Over(dst, dr, adr, src, sr, &o) + case Src: + z.scale_Image_Image_Src(dst, dr, adr, src, sr, &o) + } + } else if _, ok := src.(*image.Uniform); ok { + Draw(dst, dr, src, src.Bounds().Min, op) + } else { + $switch z.scale_$dTypeRN_$sTypeRN$sratio_$op(dst, dr, adr, src, sr, &o) + } + } + + func (z $receiver) Transform(dst Image, s2d f64.Aff3, src image.Image, sr image.Rectangle, op Op, opts *Options) { + // Try to simplify a Transform to a Copy. + if s2d[0] == 1 && s2d[1] == 0 && s2d[3] == 0 && s2d[4] == 1 { + dx := int(s2d[2]) + dy := int(s2d[5]) + if float64(dx) == s2d[2] && float64(dy) == s2d[5] { + Copy(dst, image.Point{X: sr.Min.X + dx, Y: sr.Min.X + dy}, src, sr, op, opts) + return + } + } + + var o Options + if opts != nil { + o = *opts + } + + dr := transformRect(&s2d, &sr) + // adr is the affected destination pixels. + adr := dst.Bounds().Intersect(dr) + adr, o.DstMask = clipAffectedDestRect(adr, o.DstMask, o.DstMaskP) + if adr.Empty() || sr.Empty() { + return + } + if op == Over && o.SrcMask == nil && opaque(src) { + op = Src + } + + d2s := invert(&s2d) + // bias is a translation of the mapping from dst coordinates to src + // coordinates such that the latter temporarily have non-negative X + // and Y coordinates. This allows us to write int(f) instead of + // int(math.Floor(f)), since "round to zero" and "round down" are + // equivalent when f >= 0, but the former is much cheaper. The X-- + // and Y-- are because the TransformLeaf methods have a "sx -= 0.5" + // adjustment. + bias := transformRect(&d2s, &adr).Min + bias.X-- + bias.Y-- + d2s[2] -= float64(bias.X) + d2s[5] -= float64(bias.Y) + // Make adr relative to dr.Min. + adr = adr.Sub(dr.Min) + // sr is the source pixels. If it extends beyond the src bounds, + // we cannot use the type-specific fast paths, as they access + // the Pix fields directly without bounds checking. + // + // Similarly, the fast paths assume that the masks are nil. + if o.DstMask != nil || o.SrcMask != nil || !sr.In(src.Bounds()) { + switch op { + case Over: + z.transform_Image_Image_Over(dst, dr, adr, &d2s, src, sr, bias, &o) + case Src: + z.transform_Image_Image_Src(dst, dr, adr, &d2s, src, sr, bias, &o) + } + } else if u, ok := src.(*image.Uniform); ok { + transform_Uniform(dst, dr, adr, &d2s, u, sr, bias, op) + } else { + $switch z.transform_$dTypeRN_$sTypeRN$sratio_$op(dst, dr, adr, &d2s, src, sr, bias, &o) + } + } + ` + + codeNNScaleLeaf = ` + func (nnInterpolator) scale_$dTypeRN_$sTypeRN$sratio_$op(dst $dType, dr, adr image.Rectangle, src $sType, sr image.Rectangle, opts *Options) { + dw2 := uint64(dr.Dx()) * 2 + dh2 := uint64(dr.Dy()) * 2 + sw := uint64(sr.Dx()) + sh := uint64(sr.Dy()) + $preOuter + for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { + sy := (2*uint64(dy) + 1) * sh / dh2 + $preInner + for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { $tweakDx + sx := (2*uint64(dx) + 1) * sw / dw2 + p := $srcu[sr.Min.X + int(sx), sr.Min.Y + int(sy)] + $outputu[dr.Min.X + int(dx), dr.Min.Y + int(dy), p] + } + } + } + ` + + codeNNTransformLeaf = ` + func (nnInterpolator) transform_$dTypeRN_$sTypeRN$sratio_$op(dst $dType, dr, adr image.Rectangle, d2s *f64.Aff3, src $sType, sr image.Rectangle, bias image.Point, opts *Options) { + $preOuter + for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { + dyf := float64(dr.Min.Y + int(dy)) + 0.5 + $preInner + for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { $tweakDx + dxf := float64(dr.Min.X + int(dx)) + 0.5 + sx0 := int(d2s[0]*dxf + d2s[1]*dyf + d2s[2]) + bias.X + sy0 := int(d2s[3]*dxf + d2s[4]*dyf + d2s[5]) + bias.Y + if !(image.Point{sx0, sy0}).In(sr) { + continue + } + p := $srcu[sx0, sy0] + $outputu[dr.Min.X + int(dx), dr.Min.Y + int(dy), p] + } + } + } + ` + + codeABLScaleLeaf = ` + func (ablInterpolator) scale_$dTypeRN_$sTypeRN$sratio_$op(dst $dType, dr, adr image.Rectangle, src $sType, sr image.Rectangle, opts *Options) { + sw := int32(sr.Dx()) + sh := int32(sr.Dy()) + yscale := float64(sh) / float64(dr.Dy()) + xscale := float64(sw) / float64(dr.Dx()) + swMinus1, shMinus1 := sw - 1, sh - 1 + $preOuter + + for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { + sy := (float64(dy)+0.5)*yscale - 0.5 + // If sy < 0, we will clamp sy0 to 0 anyway, so it doesn't matter if + // we say int32(sy) instead of int32(math.Floor(sy)). Similarly for + // sx, below. + sy0 := int32(sy) + yFrac0 := sy - float64(sy0) + yFrac1 := 1 - yFrac0 + sy1 := sy0 + 1 + if sy < 0 { + sy0, sy1 = 0, 0 + yFrac0, yFrac1 = 0, 1 + } else if sy1 > shMinus1 { + sy0, sy1 = shMinus1, shMinus1 + yFrac0, yFrac1 = 1, 0 + } + $preInner + + for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { $tweakDx + sx := (float64(dx)+0.5)*xscale - 0.5 + sx0 := int32(sx) + xFrac0 := sx - float64(sx0) + xFrac1 := 1 - xFrac0 + sx1 := sx0 + 1 + if sx < 0 { + sx0, sx1 = 0, 0 + xFrac0, xFrac1 = 0, 1 + } else if sx1 > swMinus1 { + sx0, sx1 = swMinus1, swMinus1 + xFrac0, xFrac1 = 1, 0 + } + + s00 := $srcf[sr.Min.X + int(sx0), sr.Min.Y + int(sy0)] + s10 := $srcf[sr.Min.X + int(sx1), sr.Min.Y + int(sy0)] + $blend[xFrac1, s00, xFrac0, s10] + s01 := $srcf[sr.Min.X + int(sx0), sr.Min.Y + int(sy1)] + s11 := $srcf[sr.Min.X + int(sx1), sr.Min.Y + int(sy1)] + $blend[xFrac1, s01, xFrac0, s11] + $blend[yFrac1, s10, yFrac0, s11] + $convFtou[p, s11] + $outputu[dr.Min.X + int(dx), dr.Min.Y + int(dy), p] + } + } + } + ` + + codeABLTransformLeaf = ` + func (ablInterpolator) transform_$dTypeRN_$sTypeRN$sratio_$op(dst $dType, dr, adr image.Rectangle, d2s *f64.Aff3, src $sType, sr image.Rectangle, bias image.Point, opts *Options) { + $preOuter + for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { + dyf := float64(dr.Min.Y + int(dy)) + 0.5 + $preInner + for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { $tweakDx + dxf := float64(dr.Min.X + int(dx)) + 0.5 + sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] + sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { + continue + } + + sx -= 0.5 + sx0 := int(sx) + xFrac0 := sx - float64(sx0) + xFrac1 := 1 - xFrac0 + sx0 += bias.X + sx1 := sx0 + 1 + if sx0 < sr.Min.X { + sx0, sx1 = sr.Min.X, sr.Min.X + xFrac0, xFrac1 = 0, 1 + } else if sx1 >= sr.Max.X { + sx0, sx1 = sr.Max.X-1, sr.Max.X-1 + xFrac0, xFrac1 = 1, 0 + } + + sy -= 0.5 + sy0 := int(sy) + yFrac0 := sy - float64(sy0) + yFrac1 := 1 - yFrac0 + sy0 += bias.Y + sy1 := sy0 + 1 + if sy0 < sr.Min.Y { + sy0, sy1 = sr.Min.Y, sr.Min.Y + yFrac0, yFrac1 = 0, 1 + } else if sy1 >= sr.Max.Y { + sy0, sy1 = sr.Max.Y-1, sr.Max.Y-1 + yFrac0, yFrac1 = 1, 0 + } + + s00 := $srcf[sx0, sy0] + s10 := $srcf[sx1, sy0] + $blend[xFrac1, s00, xFrac0, s10] + s01 := $srcf[sx0, sy1] + s11 := $srcf[sx1, sy1] + $blend[xFrac1, s01, xFrac0, s11] + $blend[yFrac1, s10, yFrac0, s11] + $convFtou[p, s11] + $outputu[dr.Min.X + int(dx), dr.Min.Y + int(dy), p] + } + } + } + ` + + codeKernelRoot = ` + func (z *kernelScaler) Scale(dst Image, dr image.Rectangle, src image.Image, sr image.Rectangle, op Op, opts *Options) { + if z.dw != int32(dr.Dx()) || z.dh != int32(dr.Dy()) || z.sw != int32(sr.Dx()) || z.sh != int32(sr.Dy()) { + z.kernel.Scale(dst, dr, src, sr, op, opts) + return + } + + var o Options + if opts != nil { + o = *opts + } + + // adr is the affected destination pixels. + adr := dst.Bounds().Intersect(dr) + adr, o.DstMask = clipAffectedDestRect(adr, o.DstMask, o.DstMaskP) + if adr.Empty() || sr.Empty() { + return + } + // Make adr relative to dr.Min. + adr = adr.Sub(dr.Min) + if op == Over && o.SrcMask == nil && opaque(src) { + op = Src + } + + if _, ok := src.(*image.Uniform); ok && o.DstMask == nil && o.SrcMask == nil && sr.In(src.Bounds()) { + Draw(dst, dr, src, src.Bounds().Min, op) + return + } + + // Create a temporary buffer: + // scaleX distributes the source image's columns over the temporary image. + // scaleY distributes the temporary image's rows over the destination image. + var tmp [][4]float64 + if z.pool.New != nil { + tmpp := z.pool.Get().(*[][4]float64) + defer z.pool.Put(tmpp) + tmp = *tmpp + } else { + tmp = z.makeTmpBuf() + } + + // sr is the source pixels. If it extends beyond the src bounds, + // we cannot use the type-specific fast paths, as they access + // the Pix fields directly without bounds checking. + // + // Similarly, the fast paths assume that the masks are nil. + if o.SrcMask != nil || !sr.In(src.Bounds()) { + z.scaleX_Image(tmp, src, sr, &o) + } else { + $switchS z.scaleX_$sTypeRN$sratio(tmp, src, sr, &o) + } + + if o.DstMask != nil { + switch op { + case Over: + z.scaleY_Image_Over(dst, dr, adr, tmp, &o) + case Src: + z.scaleY_Image_Src(dst, dr, adr, tmp, &o) + } + } else { + $switchD z.scaleY_$dTypeRN_$op(dst, dr, adr, tmp, &o) + } + } + + func (q *Kernel) Transform(dst Image, s2d f64.Aff3, src image.Image, sr image.Rectangle, op Op, opts *Options) { + var o Options + if opts != nil { + o = *opts + } + + dr := transformRect(&s2d, &sr) + // adr is the affected destination pixels. + adr := dst.Bounds().Intersect(dr) + adr, o.DstMask = clipAffectedDestRect(adr, o.DstMask, o.DstMaskP) + if adr.Empty() || sr.Empty() { + return + } + if op == Over && o.SrcMask == nil && opaque(src) { + op = Src + } + d2s := invert(&s2d) + // bias is a translation of the mapping from dst coordinates to src + // coordinates such that the latter temporarily have non-negative X + // and Y coordinates. This allows us to write int(f) instead of + // int(math.Floor(f)), since "round to zero" and "round down" are + // equivalent when f >= 0, but the former is much cheaper. The X-- + // and Y-- are because the TransformLeaf methods have a "sx -= 0.5" + // adjustment. + bias := transformRect(&d2s, &adr).Min + bias.X-- + bias.Y-- + d2s[2] -= float64(bias.X) + d2s[5] -= float64(bias.Y) + // Make adr relative to dr.Min. + adr = adr.Sub(dr.Min) + + if u, ok := src.(*image.Uniform); ok && o.DstMask != nil && o.SrcMask != nil && sr.In(src.Bounds()) { + transform_Uniform(dst, dr, adr, &d2s, u, sr, bias, op) + return + } + + xscale := abs(d2s[0]) + if s := abs(d2s[1]); xscale < s { + xscale = s + } + yscale := abs(d2s[3]) + if s := abs(d2s[4]); yscale < s { + yscale = s + } + + // sr is the source pixels. If it extends beyond the src bounds, + // we cannot use the type-specific fast paths, as they access + // the Pix fields directly without bounds checking. + // + // Similarly, the fast paths assume that the masks are nil. + if o.DstMask != nil || o.SrcMask != nil || !sr.In(src.Bounds()) { + switch op { + case Over: + q.transform_Image_Image_Over(dst, dr, adr, &d2s, src, sr, bias, xscale, yscale, &o) + case Src: + q.transform_Image_Image_Src(dst, dr, adr, &d2s, src, sr, bias, xscale, yscale, &o) + } + } else { + $switch q.transform_$dTypeRN_$sTypeRN$sratio_$op(dst, dr, adr, &d2s, src, sr, bias, xscale, yscale, &o) + } + } + ` + + codeKernelScaleLeafX = ` + func (z *kernelScaler) scaleX_$sTypeRN$sratio(tmp [][4]float64, src $sType, sr image.Rectangle, opts *Options) { + t := 0 + $preKernelOuter + for y := int32(0); y < z.sh; y++ { + for _, s := range z.horizontal.sources { + var pr, pg, pb, pa float64 $tweakVarP + for _, c := range z.horizontal.contribs[s.i:s.j] { + p += $srcf[sr.Min.X + int(c.coord), sr.Min.Y + int(y)] * c.weight + } + $tweakPr + tmp[t] = [4]float64{ + pr * s.invTotalWeightFFFF, $tweakP + pg * s.invTotalWeightFFFF, $tweakP + pb * s.invTotalWeightFFFF, $tweakP + pa * s.invTotalWeightFFFF, $tweakP + } + t++ + } + } + } + ` + + codeKernelScaleLeafY = ` + func (z *kernelScaler) scaleY_$dTypeRN_$op(dst $dType, dr, adr image.Rectangle, tmp [][4]float64, opts *Options) { + $preOuter + for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { + $preKernelInner + for dy, s := range z.vertical.sources[adr.Min.Y:adr.Max.Y] { $tweakDy + var pr, pg, pb, pa float64 + for _, c := range z.vertical.contribs[s.i:s.j] { + p := &tmp[c.coord*z.dw+dx] + pr += p[0] * c.weight + pg += p[1] * c.weight + pb += p[2] * c.weight + pa += p[3] * c.weight + } + $clampToAlpha + $outputf[dr.Min.X + int(dx), dr.Min.Y + int(adr.Min.Y + dy), ftou, p, s.invTotalWeight] + $tweakD + } + } + } + ` + + codeKernelTransformLeaf = ` + func (q *Kernel) transform_$dTypeRN_$sTypeRN$sratio_$op(dst $dType, dr, adr image.Rectangle, d2s *f64.Aff3, src $sType, sr image.Rectangle, bias image.Point, xscale, yscale float64, opts *Options) { + // When shrinking, broaden the effective kernel support so that we still + // visit every source pixel. + xHalfWidth, xKernelArgScale := q.Support, 1.0 + if xscale > 1 { + xHalfWidth *= xscale + xKernelArgScale = 1 / xscale + } + yHalfWidth, yKernelArgScale := q.Support, 1.0 + if yscale > 1 { + yHalfWidth *= yscale + yKernelArgScale = 1 / yscale + } + + xWeights := make([]float64, 1 + 2*int(math.Ceil(xHalfWidth))) + yWeights := make([]float64, 1 + 2*int(math.Ceil(yHalfWidth))) + + $preOuter + for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { + dyf := float64(dr.Min.Y + int(dy)) + 0.5 + $preInner + for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { $tweakDx + dxf := float64(dr.Min.X + int(dx)) + 0.5 + sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] + sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { + continue + } + + // TODO: adjust the bias so that we can use int(f) instead + // of math.Floor(f) and math.Ceil(f). + sx += float64(bias.X) + sx -= 0.5 + ix := int(math.Floor(sx - xHalfWidth)) + if ix < sr.Min.X { + ix = sr.Min.X + } + jx := int(math.Ceil(sx + xHalfWidth)) + if jx > sr.Max.X { + jx = sr.Max.X + } + + totalXWeight := 0.0 + for kx := ix; kx < jx; kx++ { + xWeight := 0.0 + if t := abs((sx - float64(kx)) * xKernelArgScale); t < q.Support { + xWeight = q.At(t) + } + xWeights[kx - ix] = xWeight + totalXWeight += xWeight + } + for x := range xWeights[:jx-ix] { + xWeights[x] /= totalXWeight + } + + sy += float64(bias.Y) + sy -= 0.5 + iy := int(math.Floor(sy - yHalfWidth)) + if iy < sr.Min.Y { + iy = sr.Min.Y + } + jy := int(math.Ceil(sy + yHalfWidth)) + if jy > sr.Max.Y { + jy = sr.Max.Y + } + + totalYWeight := 0.0 + for ky := iy; ky < jy; ky++ { + yWeight := 0.0 + if t := abs((sy - float64(ky)) * yKernelArgScale); t < q.Support { + yWeight = q.At(t) + } + yWeights[ky - iy] = yWeight + totalYWeight += yWeight + } + for y := range yWeights[:jy-iy] { + yWeights[y] /= totalYWeight + } + + var pr, pg, pb, pa float64 $tweakVarP + for ky := iy; ky < jy; ky++ { + if yWeight := yWeights[ky - iy]; yWeight != 0 { + for kx := ix; kx < jx; kx++ { + if w := xWeights[kx - ix] * yWeight; w != 0 { + p += $srcf[kx, ky] * w + } + } + } + } + $clampToAlpha + $outputf[dr.Min.X + int(dx), dr.Min.Y + int(dy), fffftou, p, 1] + } + } + } + ` +) diff --git a/vendor/golang.org/x/text/unicode/bidi/gen.go b/vendor/golang.org/x/text/unicode/bidi/gen.go new file mode 100644 index 0000000..4e1c7ba --- /dev/null +++ b/vendor/golang.org/x/text/unicode/bidi/gen.go @@ -0,0 +1,133 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +package main + +import ( + "flag" + "log" + + "golang.org/x/text/internal/gen" + "golang.org/x/text/internal/triegen" + "golang.org/x/text/internal/ucd" +) + +var outputFile = flag.String("out", "tables.go", "output file") + +func main() { + gen.Init() + gen.Repackage("gen_trieval.go", "trieval.go", "bidi") + gen.Repackage("gen_ranges.go", "ranges_test.go", "bidi") + + genTables() +} + +// bidiClass names and codes taken from class "bc" in +// http://www.unicode.org/Public/8.0.0/ucd/PropertyValueAliases.txt +var bidiClass = map[string]Class{ + "AL": AL, // ArabicLetter + "AN": AN, // ArabicNumber + "B": B, // ParagraphSeparator + "BN": BN, // BoundaryNeutral + "CS": CS, // CommonSeparator + "EN": EN, // EuropeanNumber + "ES": ES, // EuropeanSeparator + "ET": ET, // EuropeanTerminator + "L": L, // LeftToRight + "NSM": NSM, // NonspacingMark + "ON": ON, // OtherNeutral + "R": R, // RightToLeft + "S": S, // SegmentSeparator + "WS": WS, // WhiteSpace + + "FSI": Control, + "PDF": Control, + "PDI": Control, + "LRE": Control, + "LRI": Control, + "LRO": Control, + "RLE": Control, + "RLI": Control, + "RLO": Control, +} + +func genTables() { + if numClass > 0x0F { + log.Fatalf("Too many Class constants (%#x > 0x0F).", numClass) + } + w := gen.NewCodeWriter() + defer w.WriteVersionedGoFile(*outputFile, "bidi") + + gen.WriteUnicodeVersion(w) + + t := triegen.NewTrie("bidi") + + // Build data about bracket mapping. These bits need to be or-ed with + // any other bits. + orMask := map[rune]uint64{} + + xorMap := map[rune]int{} + xorMasks := []rune{0} // First value is no-op. + + ucd.Parse(gen.OpenUCDFile("BidiBrackets.txt"), func(p *ucd.Parser) { + r1 := p.Rune(0) + r2 := p.Rune(1) + xor := r1 ^ r2 + if _, ok := xorMap[xor]; !ok { + xorMap[xor] = len(xorMasks) + xorMasks = append(xorMasks, xor) + } + entry := uint64(xorMap[xor]) << xorMaskShift + switch p.String(2) { + case "o": + entry |= openMask + case "c", "n": + default: + log.Fatalf("Unknown bracket class %q.", p.String(2)) + } + orMask[r1] = entry + }) + + w.WriteComment(` + xorMasks contains masks to be xor-ed with brackets to get the reverse + version.`) + w.WriteVar("xorMasks", xorMasks) + + done := map[rune]bool{} + + insert := func(r rune, c Class) { + if !done[r] { + t.Insert(r, orMask[r]|uint64(c)) + done[r] = true + } + } + + // Insert the derived BiDi properties. + ucd.Parse(gen.OpenUCDFile("extracted/DerivedBidiClass.txt"), func(p *ucd.Parser) { + r := p.Rune(0) + class, ok := bidiClass[p.String(1)] + if !ok { + log.Fatalf("%U: Unknown BiDi class %q", r, p.String(1)) + } + insert(r, class) + }) + visitDefaults(insert) + + // TODO: use sparse blocks. This would reduce table size considerably + // from the looks of it. + + sz, err := t.Gen(w) + if err != nil { + log.Fatal(err) + } + w.Size += sz +} + +// dummy values to make methods in gen_common compile. The real versions +// will be generated by this file to tables.go. +var ( + xorMasks []rune +) diff --git a/vendor/golang.org/x/text/unicode/bidi/gen_ranges.go b/vendor/golang.org/x/text/unicode/bidi/gen_ranges.go new file mode 100644 index 0000000..51bd68f --- /dev/null +++ b/vendor/golang.org/x/text/unicode/bidi/gen_ranges.go @@ -0,0 +1,57 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +package main + +import ( + "unicode" + + "golang.org/x/text/internal/gen" + "golang.org/x/text/internal/ucd" + "golang.org/x/text/unicode/rangetable" +) + +// These tables are hand-extracted from: +// http://www.unicode.org/Public/8.0.0/ucd/extracted/DerivedBidiClass.txt +func visitDefaults(fn func(r rune, c Class)) { + // first write default values for ranges listed above. + visitRunes(fn, AL, []rune{ + 0x0600, 0x07BF, // Arabic + 0x08A0, 0x08FF, // Arabic Extended-A + 0xFB50, 0xFDCF, // Arabic Presentation Forms + 0xFDF0, 0xFDFF, + 0xFE70, 0xFEFF, + 0x0001EE00, 0x0001EEFF, // Arabic Mathematical Alpha Symbols + }) + visitRunes(fn, R, []rune{ + 0x0590, 0x05FF, // Hebrew + 0x07C0, 0x089F, // Nko et al. + 0xFB1D, 0xFB4F, + 0x00010800, 0x00010FFF, // Cypriot Syllabary et. al. + 0x0001E800, 0x0001EDFF, + 0x0001EF00, 0x0001EFFF, + }) + visitRunes(fn, ET, []rune{ // European Terminator + 0x20A0, 0x20Cf, // Currency symbols + }) + rangetable.Visit(unicode.Noncharacter_Code_Point, func(r rune) { + fn(r, BN) // Boundary Neutral + }) + ucd.Parse(gen.OpenUCDFile("DerivedCoreProperties.txt"), func(p *ucd.Parser) { + if p.String(1) == "Default_Ignorable_Code_Point" { + fn(p.Rune(0), BN) // Boundary Neutral + } + }) +} + +func visitRunes(fn func(r rune, c Class), c Class, runes []rune) { + for i := 0; i < len(runes); i += 2 { + lo, hi := runes[i], runes[i+1] + for j := lo; j <= hi; j++ { + fn(j, c) + } + } +} diff --git a/vendor/golang.org/x/text/unicode/bidi/gen_trieval.go b/vendor/golang.org/x/text/unicode/bidi/gen_trieval.go new file mode 100644 index 0000000..9cb9942 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/bidi/gen_trieval.go @@ -0,0 +1,64 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +package main + +// Class is the Unicode BiDi class. Each rune has a single class. +type Class uint + +const ( + L Class = iota // LeftToRight + R // RightToLeft + EN // EuropeanNumber + ES // EuropeanSeparator + ET // EuropeanTerminator + AN // ArabicNumber + CS // CommonSeparator + B // ParagraphSeparator + S // SegmentSeparator + WS // WhiteSpace + ON // OtherNeutral + BN // BoundaryNeutral + NSM // NonspacingMark + AL // ArabicLetter + Control // Control LRO - PDI + + numClass + + LRO // LeftToRightOverride + RLO // RightToLeftOverride + LRE // LeftToRightEmbedding + RLE // RightToLeftEmbedding + PDF // PopDirectionalFormat + LRI // LeftToRightIsolate + RLI // RightToLeftIsolate + FSI // FirstStrongIsolate + PDI // PopDirectionalIsolate + + unknownClass = ^Class(0) +) + +var controlToClass = map[rune]Class{ + 0x202D: LRO, // LeftToRightOverride, + 0x202E: RLO, // RightToLeftOverride, + 0x202A: LRE, // LeftToRightEmbedding, + 0x202B: RLE, // RightToLeftEmbedding, + 0x202C: PDF, // PopDirectionalFormat, + 0x2066: LRI, // LeftToRightIsolate, + 0x2067: RLI, // RightToLeftIsolate, + 0x2068: FSI, // FirstStrongIsolate, + 0x2069: PDI, // PopDirectionalIsolate, +} + +// A trie entry has the following bits: +// 7..5 XOR mask for brackets +// 4 1: Bracket open, 0: Bracket close +// 3..0 Class type + +const ( + openMask = 0x10 + xorMaskShift = 5 +) diff --git a/vendor/golang.org/x/text/unicode/norm/maketables.go b/vendor/golang.org/x/text/unicode/norm/maketables.go new file mode 100644 index 0000000..338c395 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/norm/maketables.go @@ -0,0 +1,976 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +// Normalization table generator. +// Data read from the web. +// See forminfo.go for a description of the trie values associated with each rune. + +package main + +import ( + "bytes" + "flag" + "fmt" + "io" + "log" + "sort" + "strconv" + "strings" + + "golang.org/x/text/internal/gen" + "golang.org/x/text/internal/triegen" + "golang.org/x/text/internal/ucd" +) + +func main() { + gen.Init() + loadUnicodeData() + compactCCC() + loadCompositionExclusions() + completeCharFields(FCanonical) + completeCharFields(FCompatibility) + computeNonStarterCounts() + verifyComputed() + printChars() + testDerived() + printTestdata() + makeTables() +} + +var ( + tablelist = flag.String("tables", + "all", + "comma-separated list of which tables to generate; "+ + "can be 'decomp', 'recomp', 'info' and 'all'") + test = flag.Bool("test", + false, + "test existing tables against DerivedNormalizationProps and generate test data for regression testing") + verbose = flag.Bool("verbose", + false, + "write data to stdout as it is parsed") +) + +const MaxChar = 0x10FFFF // anything above this shouldn't exist + +// Quick Check properties of runes allow us to quickly +// determine whether a rune may occur in a normal form. +// For a given normal form, a rune may be guaranteed to occur +// verbatim (QC=Yes), may or may not combine with another +// rune (QC=Maybe), or may not occur (QC=No). +type QCResult int + +const ( + QCUnknown QCResult = iota + QCYes + QCNo + QCMaybe +) + +func (r QCResult) String() string { + switch r { + case QCYes: + return "Yes" + case QCNo: + return "No" + case QCMaybe: + return "Maybe" + } + return "***UNKNOWN***" +} + +const ( + FCanonical = iota // NFC or NFD + FCompatibility // NFKC or NFKD + FNumberOfFormTypes +) + +const ( + MComposed = iota // NFC or NFKC + MDecomposed // NFD or NFKD + MNumberOfModes +) + +// This contains only the properties we're interested in. +type Char struct { + name string + codePoint rune // if zero, this index is not a valid code point. + ccc uint8 // canonical combining class + origCCC uint8 + excludeInComp bool // from CompositionExclusions.txt + compatDecomp bool // it has a compatibility expansion + + nTrailingNonStarters uint8 + nLeadingNonStarters uint8 // must be equal to trailing if non-zero + + forms [FNumberOfFormTypes]FormInfo // For FCanonical and FCompatibility + + state State +} + +var chars = make([]Char, MaxChar+1) +var cccMap = make(map[uint8]uint8) + +func (c Char) String() string { + buf := new(bytes.Buffer) + + fmt.Fprintf(buf, "%U [%s]:\n", c.codePoint, c.name) + fmt.Fprintf(buf, " ccc: %v\n", c.ccc) + fmt.Fprintf(buf, " excludeInComp: %v\n", c.excludeInComp) + fmt.Fprintf(buf, " compatDecomp: %v\n", c.compatDecomp) + fmt.Fprintf(buf, " state: %v\n", c.state) + fmt.Fprintf(buf, " NFC:\n") + fmt.Fprint(buf, c.forms[FCanonical]) + fmt.Fprintf(buf, " NFKC:\n") + fmt.Fprint(buf, c.forms[FCompatibility]) + + return buf.String() +} + +// In UnicodeData.txt, some ranges are marked like this: +// 3400;;Lo;0;L;;;;;N;;;;; +// 4DB5;;Lo;0;L;;;;;N;;;;; +// parseCharacter keeps a state variable indicating the weirdness. +type State int + +const ( + SNormal State = iota // known to be zero for the type + SFirst + SLast + SMissing +) + +var lastChar = rune('\u0000') + +func (c Char) isValid() bool { + return c.codePoint != 0 && c.state != SMissing +} + +type FormInfo struct { + quickCheck [MNumberOfModes]QCResult // index: MComposed or MDecomposed + verified [MNumberOfModes]bool // index: MComposed or MDecomposed + + combinesForward bool // May combine with rune on the right + combinesBackward bool // May combine with rune on the left + isOneWay bool // Never appears in result + inDecomp bool // Some decompositions result in this char. + decomp Decomposition + expandedDecomp Decomposition +} + +func (f FormInfo) String() string { + buf := bytes.NewBuffer(make([]byte, 0)) + + fmt.Fprintf(buf, " quickCheck[C]: %v\n", f.quickCheck[MComposed]) + fmt.Fprintf(buf, " quickCheck[D]: %v\n", f.quickCheck[MDecomposed]) + fmt.Fprintf(buf, " cmbForward: %v\n", f.combinesForward) + fmt.Fprintf(buf, " cmbBackward: %v\n", f.combinesBackward) + fmt.Fprintf(buf, " isOneWay: %v\n", f.isOneWay) + fmt.Fprintf(buf, " inDecomp: %v\n", f.inDecomp) + fmt.Fprintf(buf, " decomposition: %X\n", f.decomp) + fmt.Fprintf(buf, " expandedDecomp: %X\n", f.expandedDecomp) + + return buf.String() +} + +type Decomposition []rune + +func parseDecomposition(s string, skipfirst bool) (a []rune, err error) { + decomp := strings.Split(s, " ") + if len(decomp) > 0 && skipfirst { + decomp = decomp[1:] + } + for _, d := range decomp { + point, err := strconv.ParseUint(d, 16, 64) + if err != nil { + return a, err + } + a = append(a, rune(point)) + } + return a, nil +} + +func loadUnicodeData() { + f := gen.OpenUCDFile("UnicodeData.txt") + defer f.Close() + p := ucd.New(f) + for p.Next() { + r := p.Rune(ucd.CodePoint) + char := &chars[r] + + char.ccc = uint8(p.Uint(ucd.CanonicalCombiningClass)) + decmap := p.String(ucd.DecompMapping) + + exp, err := parseDecomposition(decmap, false) + isCompat := false + if err != nil { + if len(decmap) > 0 { + exp, err = parseDecomposition(decmap, true) + if err != nil { + log.Fatalf(`%U: bad decomp |%v|: "%s"`, r, decmap, err) + } + isCompat = true + } + } + + char.name = p.String(ucd.Name) + char.codePoint = r + char.forms[FCompatibility].decomp = exp + if !isCompat { + char.forms[FCanonical].decomp = exp + } else { + char.compatDecomp = true + } + if len(decmap) > 0 { + char.forms[FCompatibility].decomp = exp + } + } + if err := p.Err(); err != nil { + log.Fatal(err) + } +} + +// compactCCC converts the sparse set of CCC values to a continguous one, +// reducing the number of bits needed from 8 to 6. +func compactCCC() { + m := make(map[uint8]uint8) + for i := range chars { + c := &chars[i] + m[c.ccc] = 0 + } + cccs := []int{} + for v, _ := range m { + cccs = append(cccs, int(v)) + } + sort.Ints(cccs) + for i, c := range cccs { + cccMap[uint8(i)] = uint8(c) + m[uint8(c)] = uint8(i) + } + for i := range chars { + c := &chars[i] + c.origCCC = c.ccc + c.ccc = m[c.ccc] + } + if len(m) >= 1<<6 { + log.Fatalf("too many difference CCC values: %d >= 64", len(m)) + } +} + +// CompositionExclusions.txt has form: +// 0958 # ... +// See http://unicode.org/reports/tr44/ for full explanation +func loadCompositionExclusions() { + f := gen.OpenUCDFile("CompositionExclusions.txt") + defer f.Close() + p := ucd.New(f) + for p.Next() { + c := &chars[p.Rune(0)] + if c.excludeInComp { + log.Fatalf("%U: Duplicate entry in exclusions.", c.codePoint) + } + c.excludeInComp = true + } + if e := p.Err(); e != nil { + log.Fatal(e) + } +} + +// hasCompatDecomp returns true if any of the recursive +// decompositions contains a compatibility expansion. +// In this case, the character may not occur in NFK*. +func hasCompatDecomp(r rune) bool { + c := &chars[r] + if c.compatDecomp { + return true + } + for _, d := range c.forms[FCompatibility].decomp { + if hasCompatDecomp(d) { + return true + } + } + return false +} + +// Hangul related constants. +const ( + HangulBase = 0xAC00 + HangulEnd = 0xD7A4 // hangulBase + Jamo combinations (19 * 21 * 28) + + JamoLBase = 0x1100 + JamoLEnd = 0x1113 + JamoVBase = 0x1161 + JamoVEnd = 0x1176 + JamoTBase = 0x11A8 + JamoTEnd = 0x11C3 + + JamoLVTCount = 19 * 21 * 28 + JamoTCount = 28 +) + +func isHangul(r rune) bool { + return HangulBase <= r && r < HangulEnd +} + +func isHangulWithoutJamoT(r rune) bool { + if !isHangul(r) { + return false + } + r -= HangulBase + return r < JamoLVTCount && r%JamoTCount == 0 +} + +func ccc(r rune) uint8 { + return chars[r].ccc +} + +// Insert a rune in a buffer, ordered by Canonical Combining Class. +func insertOrdered(b Decomposition, r rune) Decomposition { + n := len(b) + b = append(b, 0) + cc := ccc(r) + if cc > 0 { + // Use bubble sort. + for ; n > 0; n-- { + if ccc(b[n-1]) <= cc { + break + } + b[n] = b[n-1] + } + } + b[n] = r + return b +} + +// Recursively decompose. +func decomposeRecursive(form int, r rune, d Decomposition) Decomposition { + dcomp := chars[r].forms[form].decomp + if len(dcomp) == 0 { + return insertOrdered(d, r) + } + for _, c := range dcomp { + d = decomposeRecursive(form, c, d) + } + return d +} + +func completeCharFields(form int) { + // Phase 0: pre-expand decomposition. + for i := range chars { + f := &chars[i].forms[form] + if len(f.decomp) == 0 { + continue + } + exp := make(Decomposition, 0) + for _, c := range f.decomp { + exp = decomposeRecursive(form, c, exp) + } + f.expandedDecomp = exp + } + + // Phase 1: composition exclusion, mark decomposition. + for i := range chars { + c := &chars[i] + f := &c.forms[form] + + // Marks script-specific exclusions and version restricted. + f.isOneWay = c.excludeInComp + + // Singletons + f.isOneWay = f.isOneWay || len(f.decomp) == 1 + + // Non-starter decompositions + if len(f.decomp) > 1 { + chk := c.ccc != 0 || chars[f.decomp[0]].ccc != 0 + f.isOneWay = f.isOneWay || chk + } + + // Runes that decompose into more than two runes. + f.isOneWay = f.isOneWay || len(f.decomp) > 2 + + if form == FCompatibility { + f.isOneWay = f.isOneWay || hasCompatDecomp(c.codePoint) + } + + for _, r := range f.decomp { + chars[r].forms[form].inDecomp = true + } + } + + // Phase 2: forward and backward combining. + for i := range chars { + c := &chars[i] + f := &c.forms[form] + + if !f.isOneWay && len(f.decomp) == 2 { + f0 := &chars[f.decomp[0]].forms[form] + f1 := &chars[f.decomp[1]].forms[form] + if !f0.isOneWay { + f0.combinesForward = true + } + if !f1.isOneWay { + f1.combinesBackward = true + } + } + if isHangulWithoutJamoT(rune(i)) { + f.combinesForward = true + } + } + + // Phase 3: quick check values. + for i := range chars { + c := &chars[i] + f := &c.forms[form] + + switch { + case len(f.decomp) > 0: + f.quickCheck[MDecomposed] = QCNo + case isHangul(rune(i)): + f.quickCheck[MDecomposed] = QCNo + default: + f.quickCheck[MDecomposed] = QCYes + } + switch { + case f.isOneWay: + f.quickCheck[MComposed] = QCNo + case (i & 0xffff00) == JamoLBase: + f.quickCheck[MComposed] = QCYes + if JamoLBase <= i && i < JamoLEnd { + f.combinesForward = true + } + if JamoVBase <= i && i < JamoVEnd { + f.quickCheck[MComposed] = QCMaybe + f.combinesBackward = true + f.combinesForward = true + } + if JamoTBase <= i && i < JamoTEnd { + f.quickCheck[MComposed] = QCMaybe + f.combinesBackward = true + } + case !f.combinesBackward: + f.quickCheck[MComposed] = QCYes + default: + f.quickCheck[MComposed] = QCMaybe + } + } +} + +func computeNonStarterCounts() { + // Phase 4: leading and trailing non-starter count + for i := range chars { + c := &chars[i] + + runes := []rune{rune(i)} + // We always use FCompatibility so that the CGJ insertion points do not + // change for repeated normalizations with different forms. + if exp := c.forms[FCompatibility].expandedDecomp; len(exp) > 0 { + runes = exp + } + // We consider runes that combine backwards to be non-starters for the + // purpose of Stream-Safe Text Processing. + for _, r := range runes { + if cr := &chars[r]; cr.ccc == 0 && !cr.forms[FCompatibility].combinesBackward { + break + } + c.nLeadingNonStarters++ + } + for i := len(runes) - 1; i >= 0; i-- { + if cr := &chars[runes[i]]; cr.ccc == 0 && !cr.forms[FCompatibility].combinesBackward { + break + } + c.nTrailingNonStarters++ + } + if c.nTrailingNonStarters > 3 { + log.Fatalf("%U: Decomposition with more than 3 (%d) trailing modifiers (%U)", i, c.nTrailingNonStarters, runes) + } + + if isHangul(rune(i)) { + c.nTrailingNonStarters = 2 + if isHangulWithoutJamoT(rune(i)) { + c.nTrailingNonStarters = 1 + } + } + + if l, t := c.nLeadingNonStarters, c.nTrailingNonStarters; l > 0 && l != t { + log.Fatalf("%U: number of leading and trailing non-starters should be equal (%d vs %d)", i, l, t) + } + if t := c.nTrailingNonStarters; t > 3 { + log.Fatalf("%U: number of trailing non-starters is %d > 3", t) + } + } +} + +func printBytes(w io.Writer, b []byte, name string) { + fmt.Fprintf(w, "// %s: %d bytes\n", name, len(b)) + fmt.Fprintf(w, "var %s = [...]byte {", name) + for i, c := range b { + switch { + case i%64 == 0: + fmt.Fprintf(w, "\n// Bytes %x - %x\n", i, i+63) + case i%8 == 0: + fmt.Fprintf(w, "\n") + } + fmt.Fprintf(w, "0x%.2X, ", c) + } + fmt.Fprint(w, "\n}\n\n") +} + +// See forminfo.go for format. +func makeEntry(f *FormInfo, c *Char) uint16 { + e := uint16(0) + if r := c.codePoint; HangulBase <= r && r < HangulEnd { + e |= 0x40 + } + if f.combinesForward { + e |= 0x20 + } + if f.quickCheck[MDecomposed] == QCNo { + e |= 0x4 + } + switch f.quickCheck[MComposed] { + case QCYes: + case QCNo: + e |= 0x10 + case QCMaybe: + e |= 0x18 + default: + log.Fatalf("Illegal quickcheck value %v.", f.quickCheck[MComposed]) + } + e |= uint16(c.nTrailingNonStarters) + return e +} + +// decompSet keeps track of unique decompositions, grouped by whether +// the decomposition is followed by a trailing and/or leading CCC. +type decompSet [7]map[string]bool + +const ( + normalDecomp = iota + firstMulti + firstCCC + endMulti + firstLeadingCCC + firstCCCZeroExcept + firstStarterWithNLead + lastDecomp +) + +var cname = []string{"firstMulti", "firstCCC", "endMulti", "firstLeadingCCC", "firstCCCZeroExcept", "firstStarterWithNLead", "lastDecomp"} + +func makeDecompSet() decompSet { + m := decompSet{} + for i := range m { + m[i] = make(map[string]bool) + } + return m +} +func (m *decompSet) insert(key int, s string) { + m[key][s] = true +} + +func printCharInfoTables(w io.Writer) int { + mkstr := func(r rune, f *FormInfo) (int, string) { + d := f.expandedDecomp + s := string([]rune(d)) + if max := 1 << 6; len(s) >= max { + const msg = "%U: too many bytes in decomposition: %d >= %d" + log.Fatalf(msg, r, len(s), max) + } + head := uint8(len(s)) + if f.quickCheck[MComposed] != QCYes { + head |= 0x40 + } + if f.combinesForward { + head |= 0x80 + } + s = string([]byte{head}) + s + + lccc := ccc(d[0]) + tccc := ccc(d[len(d)-1]) + cc := ccc(r) + if cc != 0 && lccc == 0 && tccc == 0 { + log.Fatalf("%U: trailing and leading ccc are 0 for non-zero ccc %d", r, cc) + } + if tccc < lccc && lccc != 0 { + const msg = "%U: lccc (%d) must be <= tcc (%d)" + log.Fatalf(msg, r, lccc, tccc) + } + index := normalDecomp + nTrail := chars[r].nTrailingNonStarters + nLead := chars[r].nLeadingNonStarters + if tccc > 0 || lccc > 0 || nTrail > 0 { + tccc <<= 2 + tccc |= nTrail + s += string([]byte{tccc}) + index = endMulti + for _, r := range d[1:] { + if ccc(r) == 0 { + index = firstCCC + } + } + if lccc > 0 || nLead > 0 { + s += string([]byte{lccc}) + if index == firstCCC { + log.Fatalf("%U: multi-segment decomposition not supported for decompositions with leading CCC != 0", r) + } + index = firstLeadingCCC + } + if cc != lccc { + if cc != 0 { + log.Fatalf("%U: for lccc != ccc, expected ccc to be 0; was %d", r, cc) + } + index = firstCCCZeroExcept + } + } else if len(d) > 1 { + index = firstMulti + } + return index, s + } + + decompSet := makeDecompSet() + const nLeadStr = "\x00\x01" // 0-byte length and tccc with nTrail. + decompSet.insert(firstStarterWithNLead, nLeadStr) + + // Store the uniqued decompositions in a byte buffer, + // preceded by their byte length. + for _, c := range chars { + for _, f := range c.forms { + if len(f.expandedDecomp) == 0 { + continue + } + if f.combinesBackward { + log.Fatalf("%U: combinesBackward and decompose", c.codePoint) + } + index, s := mkstr(c.codePoint, &f) + decompSet.insert(index, s) + } + } + + decompositions := bytes.NewBuffer(make([]byte, 0, 10000)) + size := 0 + positionMap := make(map[string]uint16) + decompositions.WriteString("\000") + fmt.Fprintln(w, "const (") + for i, m := range decompSet { + sa := []string{} + for s := range m { + sa = append(sa, s) + } + sort.Strings(sa) + for _, s := range sa { + p := decompositions.Len() + decompositions.WriteString(s) + positionMap[s] = uint16(p) + } + if cname[i] != "" { + fmt.Fprintf(w, "%s = 0x%X\n", cname[i], decompositions.Len()) + } + } + fmt.Fprintln(w, "maxDecomp = 0x8000") + fmt.Fprintln(w, ")") + b := decompositions.Bytes() + printBytes(w, b, "decomps") + size += len(b) + + varnames := []string{"nfc", "nfkc"} + for i := 0; i < FNumberOfFormTypes; i++ { + trie := triegen.NewTrie(varnames[i]) + + for r, c := range chars { + f := c.forms[i] + d := f.expandedDecomp + if len(d) != 0 { + _, key := mkstr(c.codePoint, &f) + trie.Insert(rune(r), uint64(positionMap[key])) + if c.ccc != ccc(d[0]) { + // We assume the lead ccc of a decomposition !=0 in this case. + if ccc(d[0]) == 0 { + log.Fatalf("Expected leading CCC to be non-zero; ccc is %d", c.ccc) + } + } + } else if c.nLeadingNonStarters > 0 && len(f.expandedDecomp) == 0 && c.ccc == 0 && !f.combinesBackward { + // Handle cases where it can't be detected that the nLead should be equal + // to nTrail. + trie.Insert(c.codePoint, uint64(positionMap[nLeadStr])) + } else if v := makeEntry(&f, &c)<<8 | uint16(c.ccc); v != 0 { + trie.Insert(c.codePoint, uint64(0x8000|v)) + } + } + sz, err := trie.Gen(w, triegen.Compact(&normCompacter{name: varnames[i]})) + if err != nil { + log.Fatal(err) + } + size += sz + } + return size +} + +func contains(sa []string, s string) bool { + for _, a := range sa { + if a == s { + return true + } + } + return false +} + +func makeTables() { + w := &bytes.Buffer{} + + size := 0 + if *tablelist == "" { + return + } + list := strings.Split(*tablelist, ",") + if *tablelist == "all" { + list = []string{"recomp", "info"} + } + + // Compute maximum decomposition size. + max := 0 + for _, c := range chars { + if n := len(string(c.forms[FCompatibility].expandedDecomp)); n > max { + max = n + } + } + + fmt.Fprintln(w, "const (") + fmt.Fprintln(w, "\t// Version is the Unicode edition from which the tables are derived.") + fmt.Fprintf(w, "\tVersion = %q\n", gen.UnicodeVersion()) + fmt.Fprintln(w) + fmt.Fprintln(w, "\t// MaxTransformChunkSize indicates the maximum number of bytes that Transform") + fmt.Fprintln(w, "\t// may need to write atomically for any Form. Making a destination buffer at") + fmt.Fprintln(w, "\t// least this size ensures that Transform can always make progress and that") + fmt.Fprintln(w, "\t// the user does not need to grow the buffer on an ErrShortDst.") + fmt.Fprintf(w, "\tMaxTransformChunkSize = %d+maxNonStarters*4\n", len(string(0x034F))+max) + fmt.Fprintln(w, ")\n") + + // Print the CCC remap table. + size += len(cccMap) + fmt.Fprintf(w, "var ccc = [%d]uint8{", len(cccMap)) + for i := 0; i < len(cccMap); i++ { + if i%8 == 0 { + fmt.Fprintln(w) + } + fmt.Fprintf(w, "%3d, ", cccMap[uint8(i)]) + } + fmt.Fprintln(w, "\n}\n") + + if contains(list, "info") { + size += printCharInfoTables(w) + } + + if contains(list, "recomp") { + // Note that we use 32 bit keys, instead of 64 bit. + // This clips the bits of three entries, but we know + // this won't cause a collision. The compiler will catch + // any changes made to UnicodeData.txt that introduces + // a collision. + // Note that the recomposition map for NFC and NFKC + // are identical. + + // Recomposition map + nrentries := 0 + for _, c := range chars { + f := c.forms[FCanonical] + if !f.isOneWay && len(f.decomp) > 0 { + nrentries++ + } + } + sz := nrentries * 8 + size += sz + fmt.Fprintf(w, "// recompMap: %d bytes (entries only)\n", sz) + fmt.Fprintln(w, "var recompMap = map[uint32]rune{") + for i, c := range chars { + f := c.forms[FCanonical] + d := f.decomp + if !f.isOneWay && len(d) > 0 { + key := uint32(uint16(d[0]))<<16 + uint32(uint16(d[1])) + fmt.Fprintf(w, "0x%.8X: 0x%.4X,\n", key, i) + } + } + fmt.Fprintf(w, "}\n\n") + } + + fmt.Fprintf(w, "// Total size of tables: %dKB (%d bytes)\n", (size+512)/1024, size) + gen.WriteVersionedGoFile("tables.go", "norm", w.Bytes()) +} + +func printChars() { + if *verbose { + for _, c := range chars { + if !c.isValid() || c.state == SMissing { + continue + } + fmt.Println(c) + } + } +} + +// verifyComputed does various consistency tests. +func verifyComputed() { + for i, c := range chars { + for _, f := range c.forms { + isNo := (f.quickCheck[MDecomposed] == QCNo) + if (len(f.decomp) > 0) != isNo && !isHangul(rune(i)) { + log.Fatalf("%U: NF*D QC must be No if rune decomposes", i) + } + + isMaybe := f.quickCheck[MComposed] == QCMaybe + if f.combinesBackward != isMaybe { + log.Fatalf("%U: NF*C QC must be Maybe if combinesBackward", i) + } + if len(f.decomp) > 0 && f.combinesForward && isMaybe { + log.Fatalf("%U: NF*C QC must be Yes or No if combinesForward and decomposes", i) + } + + if len(f.expandedDecomp) != 0 { + continue + } + if a, b := c.nLeadingNonStarters > 0, (c.ccc > 0 || f.combinesBackward); a != b { + // We accept these runes to be treated differently (it only affects + // segment breaking in iteration, most likely on improper use), but + // reconsider if more characters are added. + // U+FF9E HALFWIDTH KATAKANA VOICED SOUND MARK;Lm;0;L; 3099;;;;N;;;;; + // U+FF9F HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK;Lm;0;L; 309A;;;;N;;;;; + // U+3133 HANGUL LETTER KIYEOK-SIOS;Lo;0;L; 11AA;;;;N;HANGUL LETTER GIYEOG SIOS;;;; + // U+318E HANGUL LETTER ARAEAE;Lo;0;L; 11A1;;;;N;HANGUL LETTER ALAE AE;;;; + // U+FFA3 HALFWIDTH HANGUL LETTER KIYEOK-SIOS;Lo;0;L; 3133;;;;N;HALFWIDTH HANGUL LETTER GIYEOG SIOS;;;; + // U+FFDC HALFWIDTH HANGUL LETTER I;Lo;0;L; 3163;;;;N;;;;; + if i != 0xFF9E && i != 0xFF9F && !(0x3133 <= i && i <= 0x318E) && !(0xFFA3 <= i && i <= 0xFFDC) { + log.Fatalf("%U: nLead was %v; want %v", i, a, b) + } + } + } + nfc := c.forms[FCanonical] + nfkc := c.forms[FCompatibility] + if nfc.combinesBackward != nfkc.combinesBackward { + log.Fatalf("%U: Cannot combine combinesBackward\n", c.codePoint) + } + } +} + +// Use values in DerivedNormalizationProps.txt to compare against the +// values we computed. +// DerivedNormalizationProps.txt has form: +// 00C0..00C5 ; NFD_QC; N # ... +// 0374 ; NFD_QC; N # ... +// See http://unicode.org/reports/tr44/ for full explanation +func testDerived() { + f := gen.OpenUCDFile("DerivedNormalizationProps.txt") + defer f.Close() + p := ucd.New(f) + for p.Next() { + r := p.Rune(0) + c := &chars[r] + + var ftype, mode int + qt := p.String(1) + switch qt { + case "NFC_QC": + ftype, mode = FCanonical, MComposed + case "NFD_QC": + ftype, mode = FCanonical, MDecomposed + case "NFKC_QC": + ftype, mode = FCompatibility, MComposed + case "NFKD_QC": + ftype, mode = FCompatibility, MDecomposed + default: + continue + } + var qr QCResult + switch p.String(2) { + case "Y": + qr = QCYes + case "N": + qr = QCNo + case "M": + qr = QCMaybe + default: + log.Fatalf(`Unexpected quick check value "%s"`, p.String(2)) + } + if got := c.forms[ftype].quickCheck[mode]; got != qr { + log.Printf("%U: FAILED %s (was %v need %v)\n", r, qt, got, qr) + } + c.forms[ftype].verified[mode] = true + } + if err := p.Err(); err != nil { + log.Fatal(err) + } + // Any unspecified value must be QCYes. Verify this. + for i, c := range chars { + for j, fd := range c.forms { + for k, qr := range fd.quickCheck { + if !fd.verified[k] && qr != QCYes { + m := "%U: FAIL F:%d M:%d (was %v need Yes) %s\n" + log.Printf(m, i, j, k, qr, c.name) + } + } + } + } +} + +var testHeader = `const ( + Yes = iota + No + Maybe +) + +type formData struct { + qc uint8 + combinesForward bool + decomposition string +} + +type runeData struct { + r rune + ccc uint8 + nLead uint8 + nTrail uint8 + f [2]formData // 0: canonical; 1: compatibility +} + +func f(qc uint8, cf bool, dec string) [2]formData { + return [2]formData{{qc, cf, dec}, {qc, cf, dec}} +} + +func g(qc, qck uint8, cf, cfk bool, d, dk string) [2]formData { + return [2]formData{{qc, cf, d}, {qck, cfk, dk}} +} + +var testData = []runeData{ +` + +func printTestdata() { + type lastInfo struct { + ccc uint8 + nLead uint8 + nTrail uint8 + f string + } + + last := lastInfo{} + w := &bytes.Buffer{} + fmt.Fprintf(w, testHeader) + for r, c := range chars { + f := c.forms[FCanonical] + qc, cf, d := f.quickCheck[MComposed], f.combinesForward, string(f.expandedDecomp) + f = c.forms[FCompatibility] + qck, cfk, dk := f.quickCheck[MComposed], f.combinesForward, string(f.expandedDecomp) + s := "" + if d == dk && qc == qck && cf == cfk { + s = fmt.Sprintf("f(%s, %v, %q)", qc, cf, d) + } else { + s = fmt.Sprintf("g(%s, %s, %v, %v, %q, %q)", qc, qck, cf, cfk, d, dk) + } + current := lastInfo{c.ccc, c.nLeadingNonStarters, c.nTrailingNonStarters, s} + if last != current { + fmt.Fprintf(w, "\t{0x%x, %d, %d, %d, %s},\n", r, c.origCCC, c.nLeadingNonStarters, c.nTrailingNonStarters, s) + last = current + } + } + fmt.Fprintln(w, "}") + gen.WriteVersionedGoFile("data_test.go", "norm", w.Bytes()) +} diff --git a/vendor/golang.org/x/text/unicode/norm/triegen.go b/vendor/golang.org/x/text/unicode/norm/triegen.go new file mode 100644 index 0000000..45d7119 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/norm/triegen.go @@ -0,0 +1,117 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +// Trie table generator. +// Used by make*tables tools to generate a go file with trie data structures +// for mapping UTF-8 to a 16-bit value. All but the last byte in a UTF-8 byte +// sequence are used to lookup offsets in the index table to be used for the +// next byte. The last byte is used to index into a table with 16-bit values. + +package main + +import ( + "fmt" + "io" +) + +const maxSparseEntries = 16 + +type normCompacter struct { + sparseBlocks [][]uint64 + sparseOffset []uint16 + sparseCount int + name string +} + +func mostFrequentStride(a []uint64) int { + counts := make(map[int]int) + var v int + for _, x := range a { + if stride := int(x) - v; v != 0 && stride >= 0 { + counts[stride]++ + } + v = int(x) + } + var maxs, maxc int + for stride, cnt := range counts { + if cnt > maxc || (cnt == maxc && stride < maxs) { + maxs, maxc = stride, cnt + } + } + return maxs +} + +func countSparseEntries(a []uint64) int { + stride := mostFrequentStride(a) + var v, count int + for _, tv := range a { + if int(tv)-v != stride { + if tv != 0 { + count++ + } + } + v = int(tv) + } + return count +} + +func (c *normCompacter) Size(v []uint64) (sz int, ok bool) { + if n := countSparseEntries(v); n <= maxSparseEntries { + return (n+1)*4 + 2, true + } + return 0, false +} + +func (c *normCompacter) Store(v []uint64) uint32 { + h := uint32(len(c.sparseOffset)) + c.sparseBlocks = append(c.sparseBlocks, v) + c.sparseOffset = append(c.sparseOffset, uint16(c.sparseCount)) + c.sparseCount += countSparseEntries(v) + 1 + return h +} + +func (c *normCompacter) Handler() string { + return c.name + "Sparse.lookup" +} + +func (c *normCompacter) Print(w io.Writer) (retErr error) { + p := func(f string, x ...interface{}) { + if _, err := fmt.Fprintf(w, f, x...); retErr == nil && err != nil { + retErr = err + } + } + + ls := len(c.sparseBlocks) + p("// %sSparseOffset: %d entries, %d bytes\n", c.name, ls, ls*2) + p("var %sSparseOffset = %#v\n\n", c.name, c.sparseOffset) + + ns := c.sparseCount + p("// %sSparseValues: %d entries, %d bytes\n", c.name, ns, ns*4) + p("var %sSparseValues = [%d]valueRange {", c.name, ns) + for i, b := range c.sparseBlocks { + p("\n// Block %#x, offset %#x", i, c.sparseOffset[i]) + var v int + stride := mostFrequentStride(b) + n := countSparseEntries(b) + p("\n{value:%#04x,lo:%#02x},", stride, uint8(n)) + for i, nv := range b { + if int(nv)-v != stride { + if v != 0 { + p(",hi:%#02x},", 0x80+i-1) + } + if nv != 0 { + p("\n{value:%#04x,lo:%#02x", nv, 0x80+i) + } + } + v = int(nv) + } + if v != 0 { + p(",hi:%#02x},", 0x80+len(b)-1) + } + } + p("\n}\n\n") + return +} diff --git a/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto b/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto old mode 100755 new mode 100644 diff --git a/vendor/modules.txt b/vendor/modules.txt new file mode 100644 index 0000000..8dd6a4b --- /dev/null +++ b/vendor/modules.txt @@ -0,0 +1,165 @@ +# cloud.google.com/go v0.0.0-20180131234750-2de512d2700d +cloud.google.com/go/storage +cloud.google.com/go/iam +cloud.google.com/go/internal +cloud.google.com/go/internal/optional +cloud.google.com/go/internal/version +cloud.google.com/go/compute/metadata +# github.com/Azure/azure-sdk-for-go v12.3.0-beta+incompatible +github.com/Azure/azure-sdk-for-go/storage +# github.com/Azure/go-autorest v9.9.0+incompatible +github.com/Azure/go-autorest/autorest +github.com/Azure/go-autorest/autorest/azure +github.com/Azure/go-autorest/autorest/adal +github.com/Azure/go-autorest/autorest/date +# github.com/PaulARoy/azurestoragecache v0.0.0-20170906084534-3c249a3ba788 +github.com/PaulARoy/azurestoragecache +# github.com/aws/aws-sdk-go v0.0.0-20180126231901-00cca3f093a8 +github.com/aws/aws-sdk-go/aws +github.com/aws/aws-sdk-go/aws/awserr +github.com/aws/aws-sdk-go/aws/session +github.com/aws/aws-sdk-go/service/s3 +github.com/aws/aws-sdk-go/aws/credentials +github.com/aws/aws-sdk-go/aws/endpoints +github.com/aws/aws-sdk-go/aws/client +github.com/aws/aws-sdk-go/aws/corehandlers +github.com/aws/aws-sdk-go/aws/credentials/stscreds +github.com/aws/aws-sdk-go/aws/defaults +github.com/aws/aws-sdk-go/aws/request +github.com/aws/aws-sdk-go/aws/awsutil +github.com/aws/aws-sdk-go/aws/client/metadata +github.com/aws/aws-sdk-go/aws/signer/v4 +github.com/aws/aws-sdk-go/private/protocol +github.com/aws/aws-sdk-go/private/protocol/restxml +github.com/aws/aws-sdk-go/internal/shareddefaults +github.com/aws/aws-sdk-go/service/sts +github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds +github.com/aws/aws-sdk-go/aws/credentials/endpointcreds +github.com/aws/aws-sdk-go/aws/ec2metadata +github.com/aws/aws-sdk-go/private/protocol/rest +github.com/aws/aws-sdk-go/private/protocol/query +github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil +github.com/aws/aws-sdk-go/private/protocol/query/queryutil +# github.com/dgrijalva/jwt-go v3.1.0+incompatible +github.com/dgrijalva/jwt-go +# github.com/die-net/lrucache v0.0.0-20171111232917-04b9315ab7a6 +github.com/die-net/lrucache +github.com/die-net/lrucache/twotier +# github.com/disintegration/imaging v1.3.0 +github.com/disintegration/imaging +# github.com/garyburd/redigo v1.5.0 +github.com/garyburd/redigo/redis +github.com/garyburd/redigo/internal +# github.com/go-ini/ini v1.25.4 +github.com/go-ini/ini +# github.com/golang/protobuf v1.0.0 +github.com/golang/protobuf/proto +github.com/golang/protobuf/ptypes +github.com/golang/protobuf/protoc-gen-go/descriptor +github.com/golang/protobuf/ptypes/any +github.com/golang/protobuf/ptypes/duration +github.com/golang/protobuf/ptypes/timestamp +# github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a +github.com/google/btree +# github.com/googleapis/gax-go v2.0.0+incompatible +github.com/googleapis/gax-go +# github.com/gregjones/httpcache v0.0.0-20171119193500-2bcd89a1743f +github.com/gregjones/httpcache +github.com/gregjones/httpcache/diskcache +github.com/gregjones/httpcache/redis +# github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 +github.com/jmespath/go-jmespath +# github.com/marstr/guid v0.0.0-20170427235115-8bdf7d1a087c +github.com/marstr/guid +# github.com/muesli/smartcrop v0.0.0-20171215203440-9032446b30f6 +github.com/muesli/smartcrop +# github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5 +github.com/nfnt/resize +# github.com/peterbourgon/diskv v0.0.0-20171120014656-2973218375c3 +github.com/peterbourgon/diskv +# github.com/rwcarlsen/goexif v0.0.0-20141222211634-41dad3aa0833 +github.com/rwcarlsen/goexif/exif +github.com/rwcarlsen/goexif/tiff +# github.com/satori/go.uuid v0.0.0-20180103174451-36e9d2ebbde5 +github.com/satori/go.uuid +# golang.org/x/image v0.0.0-20171214225156-12117c17ca67 +golang.org/x/image/tiff +golang.org/x/image/webp +golang.org/x/image/bmp +golang.org/x/image/draw +golang.org/x/image/tiff/lzw +golang.org/x/image/riff +golang.org/x/image/vp8 +golang.org/x/image/vp8l +golang.org/x/image/math/f64 +# golang.org/x/net v0.0.0-20180201232540-b417086c80e9 +golang.org/x/net/context +golang.org/x/net/context/ctxhttp +golang.org/x/net/http2 +golang.org/x/net/trace +golang.org/x/net/http2/hpack +golang.org/x/net/idna +golang.org/x/net/lex/httplex +golang.org/x/net/internal/timeseries +# golang.org/x/oauth2 v0.0.0-20180126164932-a032972e2806 +golang.org/x/oauth2 +golang.org/x/oauth2/internal +golang.org/x/oauth2/google +golang.org/x/oauth2/jws +golang.org/x/oauth2/jwt +# golang.org/x/text v0.0.0-20171227012246-e19ae1496984 +golang.org/x/text/secure/bidirule +golang.org/x/text/unicode/bidi +golang.org/x/text/unicode/norm +golang.org/x/text/transform +# google.golang.org/api v0.0.0-20180202000329-f7618f4b41ca +google.golang.org/api/googleapi +google.golang.org/api/iterator +google.golang.org/api/option +google.golang.org/api/storage/v1 +google.golang.org/api/transport/http +google.golang.org/api/googleapi/internal/uritemplates +google.golang.org/api/internal +google.golang.org/api/gensupport +google.golang.org/api/googleapi/transport +# google.golang.org/appengine v0.0.0-20171212223047-5bee14b453b4 +google.golang.org/appengine/urlfetch +google.golang.org/appengine/internal +google.golang.org/appengine/internal/urlfetch +google.golang.org/appengine +google.golang.org/appengine/internal/base +google.golang.org/appengine/internal/datastore +google.golang.org/appengine/internal/log +google.golang.org/appengine/internal/remote_api +google.golang.org/appengine/internal/app_identity +google.golang.org/appengine/internal/modules +# google.golang.org/genproto v0.0.0-20180125080656-4eb30f4778ee +google.golang.org/genproto/googleapis/iam/v1 +google.golang.org/genproto/googleapis/api/annotations +google.golang.org/genproto/googleapis/rpc/status +# google.golang.org/grpc v0.0.0-20180201193814-f9628db66d14 +google.golang.org/grpc +google.golang.org/grpc/status +google.golang.org/grpc/codes +google.golang.org/grpc/balancer +google.golang.org/grpc/balancer/roundrobin +google.golang.org/grpc/connectivity +google.golang.org/grpc/credentials +google.golang.org/grpc/encoding +google.golang.org/grpc/encoding/proto +google.golang.org/grpc/grpclb/grpc_lb_v1/messages +google.golang.org/grpc/grpclog +google.golang.org/grpc/internal +google.golang.org/grpc/keepalive +google.golang.org/grpc/metadata +google.golang.org/grpc/naming +google.golang.org/grpc/peer +google.golang.org/grpc/resolver +google.golang.org/grpc/resolver/dns +google.golang.org/grpc/resolver/passthrough +google.golang.org/grpc/stats +google.golang.org/grpc/tap +google.golang.org/grpc/transport +google.golang.org/grpc/balancer/base +# willnorris.com/go/gifresize v1.0.0 +willnorris.com/go/gifresize diff --git a/vendor/vendor.json b/vendor/vendor.json deleted file mode 100644 index 9a5d991..0000000 --- a/vendor/vendor.json +++ /dev/null @@ -1,831 +0,0 @@ -{ - "comment": "", - "ignore": "test", - "package": [ - { - "path": "appengine", - "revision": "" - }, - { - "path": "appengine_internal", - "revision": "" - }, - { - "path": "appengine_internal/base", - "revision": "" - }, - { - "checksumSHA1": "AH7jcN7pvaPDU6UjHdpT081DDGk=", - "path": "cloud.google.com/go/compute/metadata", - "revision": "2de512d2700d45e7db3bc7b5decfa0a6713a252c", - "revisionTime": "2018-01-31T20:58:25Z" - }, - { - "checksumSHA1": "/ixPd+hSgsbAjBI/fPqmHtTFRM8=", - "path": "cloud.google.com/go/iam", - "revision": "2de512d2700d45e7db3bc7b5decfa0a6713a252c", - "revisionTime": "2018-01-31T20:58:25Z" - }, - { - "checksumSHA1": "+2A2Mazq65iiT8xIDgSh5cypBSQ=", - "path": "cloud.google.com/go/internal", - "revision": "2de512d2700d45e7db3bc7b5decfa0a6713a252c", - "revisionTime": "2018-01-31T20:58:25Z" - }, - { - "checksumSHA1": "MCns2LLZtUZEx6JWyYBrcbSuTXg=", - "path": "cloud.google.com/go/internal/optional", - "revision": "2de512d2700d45e7db3bc7b5decfa0a6713a252c", - "revisionTime": "2018-01-31T20:58:25Z" - }, - { - "checksumSHA1": "Kiv6zkk0B9R4wmWX2nizyU4FqBs=", - "path": "cloud.google.com/go/internal/version", - "revision": "2de512d2700d45e7db3bc7b5decfa0a6713a252c", - "revisionTime": "2018-01-31T20:58:25Z" - }, - { - "checksumSHA1": "PkbOqDgZwhkn4iTXLQGM6tURyEg=", - "path": "cloud.google.com/go/storage", - "revision": "2de512d2700d45e7db3bc7b5decfa0a6713a252c", - "revisionTime": "2018-01-31T20:58:25Z" - }, - { - "checksumSHA1": "Q11VoP2I9ES8zeMHPsGhy9BxJMQ=", - "path": "github.com/Azure/azure-sdk-for-go/storage", - "revision": "a75e7321dcb5045edbbdba24b594d8f3f1b31352", - "revisionTime": "2018-01-30T20:45:22Z" - }, - { - "checksumSHA1": "sM9XTbrCfgS5BPxpFLeM5YwOZWg=", - "path": "github.com/Azure/go-autorest/autorest", - "revision": "d4e6b95c12a08b4de2d48b45d5b4d594e5d32fab", - "revisionTime": "2018-01-30T19:06:02Z" - }, - { - "checksumSHA1": "SOWyKVEKE3f4h7oE5/EV0a7YZmA=", - "path": "github.com/Azure/go-autorest/autorest/adal", - "revision": "d4e6b95c12a08b4de2d48b45d5b4d594e5d32fab", - "revisionTime": "2018-01-30T19:06:02Z" - }, - { - "checksumSHA1": "3xE3L8S3TMLhkTJS69P8tFANvLQ=", - "path": "github.com/Azure/go-autorest/autorest/azure", - "revision": "d4e6b95c12a08b4de2d48b45d5b4d594e5d32fab", - "revisionTime": "2018-01-30T19:06:02Z" - }, - { - "checksumSHA1": "9nXCi9qQsYjxCeajJKWttxgEt0I=", - "path": "github.com/Azure/go-autorest/autorest/date", - "revision": "d4e6b95c12a08b4de2d48b45d5b4d594e5d32fab", - "revisionTime": "2018-01-30T19:06:02Z" - }, - { - "checksumSHA1": "pim0S/Q+VMPsZJlyaEhGYzqjIlE=", - "path": "github.com/PaulARoy/azurestoragecache", - "revision": "3c249a3ba78867d6f4e2fc7f5264145ffb5dd0d9", - "revisionTime": "2017-09-06T08:45:34Z" - }, - { - "checksumSHA1": "3qbWQO79tzfxr3IXc5P/l0XbVaI=", - "path": "github.com/aws/aws-sdk-go/aws", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", - "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", - "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "9nE/FjZ4pYrT883KtV2/aI+Gayo=", - "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "ieAJ+Cvp/PKv1LpUEnUXpc3OI6E=", - "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "7/8j/q0TWtOgXyvEcv4B2Dhl00o=", - "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "Y+cPwQL0dZMyqp3wI+KJWmA9KQ8=", - "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=", - "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", - "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", - "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "OnU/n7R33oYXiB4SAGd5pK7I0Bs=", - "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "/EXbk/z2TWjWc1Hvb4QYs3Wmhb8=", - "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "QzwFDjKBl8XUPtQ3Sgd7+rRestk=", - "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "657ICMok3uC5dm5e9bKcVF2HaxE=", - "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "HcGL4e6Uep4/80eCUI5xkcWjpQ0=", - "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "iU00ZjhAml/13g+1YXT21IqoXqg=", - "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", - "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "NStHCXEvYqG72GknZyv1jaKaeH0=", - "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "ZqY5RWavBLWTo6j9xqdyBEaNFRk=", - "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "9V1PvtFQ9MObZTc3sa86WcuOtOU=", - "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "pkeoOfZpHRvFG/AOZeTf0lwtsFg=", - "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", - "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "0qYPUga28aQVkxZgBR3Z86AbGUQ=", - "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "sCaHoPWsJXRHFbilUKwN71qFTOI=", - "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "W1oFtpaT4TWIIJrAvFcn/XdcT7g=", - "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "+TKtBzv23ywvmmqRiGEjUba4YmI=", - "path": "github.com/dgrijalva/jwt-go", - "revision": "dbeaa9332f19a944acb5736b4456cfcc02140e29", - "revisionTime": "2017-10-19T21:57:19Z" - }, - { - "checksumSHA1": "ixCQL3bWowRQGeWOS0eg2JWTy4Q=", - "path": "github.com/die-net/lrucache", - "revision": "04b9315ab7a61886b4e51dba37a9c7cc14885fae", - "revisionTime": "2017-11-11T23:29:17Z" - }, - { - "checksumSHA1": "bLKUgAPC8sntHXaqNmt5h9ZwNkI=", - "path": "github.com/die-net/lrucache/twotier", - "revision": "04b9315ab7a61886b4e51dba37a9c7cc14885fae", - "revisionTime": "2017-11-11T23:29:17Z" - }, - { - "checksumSHA1": "0uj3/cNtus6GcTck+pG0Mevdrg0=", - "path": "github.com/disintegration/imaging", - "revision": "1884593a19ddc6f2ea050403430d02c1d0fc1283", - "revisionTime": "2017-12-09T18:20:14Z" - }, - { - "checksumSHA1": "2UmMbNHc8FBr98mJFN1k8ISOIHk=", - "path": "github.com/garyburd/redigo/internal", - "revision": "d1ed5c67e5794de818ea85e6b522fda02623a484", - "revisionTime": "2017-12-29T01:14:44Z" - }, - { - "checksumSHA1": "sc/XC7agvewnB1AGXMGZRkVzM8c=", - "path": "github.com/garyburd/redigo/redis", - "revision": "d1ed5c67e5794de818ea85e6b522fda02623a484", - "revisionTime": "2017-12-29T01:14:44Z" - }, - { - "checksumSHA1": "VvZKmbuBN1QAG699KduTdmSPwA4=", - "origin": "github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini", - "path": "github.com/go-ini/ini", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "WX1+2gktHcBmE9MGwFSGs7oqexU=", - "path": "github.com/golang/protobuf/proto", - "revision": "925541529c1fa6821df4e44ce2723319eb2be768", - "revisionTime": "2018-01-25T21:43:03Z" - }, - { - "checksumSHA1": "XNHQiRltA7NQJV0RvUroY+cf+zg=", - "path": "github.com/golang/protobuf/protoc-gen-go/descriptor", - "revision": "925541529c1fa6821df4e44ce2723319eb2be768", - "revisionTime": "2018-01-25T21:43:03Z" - }, - { - "checksumSHA1": "VfkiItDBFFkZluaAMAzJipDXNBY=", - "path": "github.com/golang/protobuf/ptypes", - "revision": "925541529c1fa6821df4e44ce2723319eb2be768", - "revisionTime": "2018-01-25T21:43:03Z" - }, - { - "checksumSHA1": "UB9scpDxeFjQe5tEthuR4zCLRu4=", - "path": "github.com/golang/protobuf/ptypes/any", - "revision": "925541529c1fa6821df4e44ce2723319eb2be768", - "revisionTime": "2018-01-25T21:43:03Z" - }, - { - "checksumSHA1": "hUjAj0dheFVDl84BAnSWj9qy2iY=", - "path": "github.com/golang/protobuf/ptypes/duration", - "revision": "925541529c1fa6821df4e44ce2723319eb2be768", - "revisionTime": "2018-01-25T21:43:03Z" - }, - { - "checksumSHA1": "O2ItP5rmfrgxPufhjJXbFlXuyL8=", - "path": "github.com/golang/protobuf/ptypes/timestamp", - "revision": "925541529c1fa6821df4e44ce2723319eb2be768", - "revisionTime": "2018-01-25T21:43:03Z" - }, - { - "checksumSHA1": "PKVjAJ/e0p/jWtGpZycgoZBLdb4=", - "path": "github.com/google/btree", - "revision": "e89373fe6b4a7413d7acd6da1725b83ef713e6e4", - "revisionTime": "2018-01-24T18:54:31Z" - }, - { - "checksumSHA1": "y1/eOdw+BOXCuT83J7mP3ReXaf8=", - "path": "github.com/googleapis/gax-go", - "revision": "317e0006254c44a0ac427cc52a0e083ff0b9622f", - "revisionTime": "2017-09-15T02:47:31Z" - }, - { - "checksumSHA1": "cxruT37CPesmfhB+LoLCb2fiR3k=", - "path": "github.com/gregjones/httpcache", - "revision": "2bcd89a1743fd4b373f7370ce8ddc14dfbd18229", - "revisionTime": "2017-11-19T19:35:00Z" - }, - { - "checksumSHA1": "A+TX1jxqy7iWvcb9ZldoG1b5SsY=", - "path": "github.com/gregjones/httpcache/diskcache", - "revision": "2bcd89a1743fd4b373f7370ce8ddc14dfbd18229", - "revisionTime": "2017-11-19T19:35:00Z" - }, - { - "checksumSHA1": "wUtgc8prI1FSfPlueFHtw2EQNDo=", - "path": "github.com/gregjones/httpcache/redis", - "revision": "2bcd89a1743fd4b373f7370ce8ddc14dfbd18229", - "revisionTime": "2017-11-19T19:35:00Z" - }, - { - "checksumSHA1": "0ZrwvB6KoGPj2PoDNSEJwxQ6Mog=", - "origin": "github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath", - "path": "github.com/jmespath/go-jmespath", - "revision": "00cca3f093a8236a93fbbeeae7d28ad83811683c", - "revisionTime": "2018-01-26T23:19:01Z" - }, - { - "checksumSHA1": "T9E+5mKBQ/BX4wlNxgaPfetxdeI=", - "path": "github.com/marstr/guid", - "revision": "8bdf7d1a087ccc975cf37dd6507da50698fd19ca", - "revisionTime": "2017-04-27T23:51:15Z" - }, - { - "checksumSHA1": "EmBHokgSNY1B0aBQALGldIUyXgI=", - "path": "github.com/muesli/smartcrop", - "revision": "9032446b30f6284f8718490b6bcff8a1d51173cf", - "revisionTime": "2017-12-15T20:34:40Z" - }, - { - "checksumSHA1": "r5eQHkttko6kxroDEENXbmXKrSs=", - "path": "github.com/nfnt/resize", - "revision": "891127d8d1b52734debe1b3c3d7e747502b6c366", - "revisionTime": "2016-07-24T20:39:20Z" - }, - { - "checksumSHA1": "K1Y3/a6mmpc31MzB2pvsC5fHrek=", - "path": "github.com/peterbourgon/diskv", - "revision": "2973218375c3d13162e1d3afe1708aaee318ef3f", - "revisionTime": "2017-11-20T01:46:56Z" - }, - { - "checksumSHA1": "l6EC85ae4bAo+LT6GlejMwFms1I=", - "path": "github.com/rwcarlsen/goexif/exif", - "revision": "41dad3aa083329f3f672b7095a9ea8a0c384bbe8", - "revisionTime": "2014-12-22T21:16:34Z" - }, - { - "checksumSHA1": "bBmKkRYPKiGH8ZbLZH8LOY6xmxQ=", - "path": "github.com/rwcarlsen/goexif/tiff", - "revision": "41dad3aa083329f3f672b7095a9ea8a0c384bbe8", - "revisionTime": "2014-12-22T21:16:34Z" - }, - { - "checksumSHA1": "eDQ6f1EsNf+frcRO/9XukSEchm8=", - "path": "github.com/satori/go.uuid", - "revision": "36e9d2ebbde5e3f13ab2e25625fd453271d6522e", - "revisionTime": "2018-01-03T17:44:51Z" - }, - { - "checksumSHA1": "UD/pejajPyS7WaWVXq2NU1eK4Ic=", - "path": "golang.org/x/image/bmp", - "revision": "12117c17ca67ffa1ce22e9409f3b0b0a93ac08c7", - "revisionTime": "2017-12-12T19:22:48Z" - }, - { - "checksumSHA1": "pQJ69B9xWCyF5FsO214fi+tnL44=", - "path": "golang.org/x/image/draw", - "revision": "12117c17ca67ffa1ce22e9409f3b0b0a93ac08c7", - "revisionTime": "2017-12-12T19:22:48Z" - }, - { - "checksumSHA1": "o7VkCGBiKM5HXzVzrIci1YDlpvc=", - "path": "golang.org/x/image/math/f64", - "revision": "12117c17ca67ffa1ce22e9409f3b0b0a93ac08c7", - "revisionTime": "2017-12-12T19:22:48Z" - }, - { - "checksumSHA1": "zdekzNuFGSoxAZ8cURGsrhBObZs=", - "path": "golang.org/x/image/riff", - "revision": "12117c17ca67ffa1ce22e9409f3b0b0a93ac08c7", - "revisionTime": "2017-12-12T19:22:48Z" - }, - { - "checksumSHA1": "SmD/LkP3vgBGPKT6I38wH7Jb6QI=", - "path": "golang.org/x/image/tiff", - "revision": "12117c17ca67ffa1ce22e9409f3b0b0a93ac08c7", - "revisionTime": "2017-12-12T19:22:48Z" - }, - { - "checksumSHA1": "PF6VjvpNpOdR8epWH1Liyy7x1Qg=", - "path": "golang.org/x/image/tiff/lzw", - "revision": "12117c17ca67ffa1ce22e9409f3b0b0a93ac08c7", - "revisionTime": "2017-12-12T19:22:48Z" - }, - { - "checksumSHA1": "ebUbLKyTEaupuKj5KsceDfkn+UA=", - "path": "golang.org/x/image/vp8", - "revision": "12117c17ca67ffa1ce22e9409f3b0b0a93ac08c7", - "revisionTime": "2017-12-12T19:22:48Z" - }, - { - "checksumSHA1": "MF/A3WDD30iVwlktK0itZ0PTJho=", - "path": "golang.org/x/image/vp8l", - "revision": "12117c17ca67ffa1ce22e9409f3b0b0a93ac08c7", - "revisionTime": "2017-12-12T19:22:48Z" - }, - { - "checksumSHA1": "wwirbKM4d69iWA4s9JwpXTsda3A=", - "path": "golang.org/x/image/webp", - "revision": "12117c17ca67ffa1ce22e9409f3b0b0a93ac08c7", - "revisionTime": "2017-12-12T19:22:48Z" - }, - { - "checksumSHA1": "GtamqiJoL7PGHsN454AoffBFMa8=", - "path": "golang.org/x/net/context", - "revision": "b417086c80e91bfa321ef761574721644b8b9f61", - "revisionTime": "2018-02-01T22:46:22Z" - }, - { - "checksumSHA1": "WHc3uByvGaMcnSoI21fhzYgbOgg=", - "path": "golang.org/x/net/context/ctxhttp", - "revision": "b417086c80e91bfa321ef761574721644b8b9f61", - "revisionTime": "2018-02-01T22:46:22Z" - }, - { - "checksumSHA1": "uL4gYOb0zwNKV0/2r/Wt8r3mwvE=", - "path": "golang.org/x/net/http2", - "revision": "b417086c80e91bfa321ef761574721644b8b9f61", - "revisionTime": "2018-02-01T22:46:22Z" - }, - { - "checksumSHA1": "ezWhc7n/FtqkLDQKeU2JbW+80tE=", - "path": "golang.org/x/net/http2/hpack", - "revision": "b417086c80e91bfa321ef761574721644b8b9f61", - "revisionTime": "2018-02-01T22:46:22Z" - }, - { - "checksumSHA1": "RcrB7tgYS/GMW4QrwVdMOTNqIU8=", - "path": "golang.org/x/net/idna", - "revision": "b417086c80e91bfa321ef761574721644b8b9f61", - "revisionTime": "2018-02-01T22:46:22Z" - }, - { - "checksumSHA1": "UxahDzW2v4mf/+aFxruuupaoIwo=", - "path": "golang.org/x/net/internal/timeseries", - "revision": "b417086c80e91bfa321ef761574721644b8b9f61", - "revisionTime": "2018-02-01T22:46:22Z" - }, - { - "checksumSHA1": "3xyuaSNmClqG4YWC7g0isQIbUTc=", - "path": "golang.org/x/net/lex/httplex", - "revision": "b417086c80e91bfa321ef761574721644b8b9f61", - "revisionTime": "2018-02-01T22:46:22Z" - }, - { - "checksumSHA1": "u/r66lwYfgg682u5hZG7/E7+VCY=", - "path": "golang.org/x/net/trace", - "revision": "b417086c80e91bfa321ef761574721644b8b9f61", - "revisionTime": "2018-02-01T22:46:22Z" - }, - { - "checksumSHA1": "njV1GJojWGOLSQqXB34S35ct190=", - "path": "golang.org/x/oauth2", - "revision": "a032972e28060ca4f5644acffae3dfc268cc09db", - "revisionTime": "2017-10-11T17:22:33Z" - }, - { - "checksumSHA1": "oSg3tdOtNm3xxj6X9FNxikU4w14=", - "path": "golang.org/x/oauth2/google", - "revision": "a032972e28060ca4f5644acffae3dfc268cc09db", - "revisionTime": "2017-10-11T17:22:33Z" - }, - { - "checksumSHA1": "Mf9Ha0R/QhPvL5aBhHLIurfGlEw=", - "path": "golang.org/x/oauth2/internal", - "revision": "a032972e28060ca4f5644acffae3dfc268cc09db", - "revisionTime": "2017-10-11T17:22:33Z" - }, - { - "checksumSHA1": "huVltYnXdRFDJLgp/ZP9IALzG7g=", - "path": "golang.org/x/oauth2/jws", - "revision": "a032972e28060ca4f5644acffae3dfc268cc09db", - "revisionTime": "2017-10-11T17:22:33Z" - }, - { - "checksumSHA1": "QPndO4ODVdEBILRhJ6869UDAoHc=", - "path": "golang.org/x/oauth2/jwt", - "revision": "a032972e28060ca4f5644acffae3dfc268cc09db", - "revisionTime": "2017-10-11T17:22:33Z" - }, - { - "checksumSHA1": "CbpjEkkOeh0fdM/V8xKDdI0AA88=", - "path": "golang.org/x/text/secure/bidirule", - "revision": "e19ae1496984b1c655b8044a65c0300a3c878dd3", - "revisionTime": "2017-12-24T20:31:28Z" - }, - { - "checksumSHA1": "ziMb9+ANGRJSSIuxYdRbA+cDRBQ=", - "path": "golang.org/x/text/transform", - "revision": "e19ae1496984b1c655b8044a65c0300a3c878dd3", - "revisionTime": "2017-12-24T20:31:28Z" - }, - { - "checksumSHA1": "w8kDfZ1Ug+qAcVU0v8obbu3aDOY=", - "path": "golang.org/x/text/unicode/bidi", - "revision": "e19ae1496984b1c655b8044a65c0300a3c878dd3", - "revisionTime": "2017-12-24T20:31:28Z" - }, - { - "checksumSHA1": "BCNYmf4Ek93G4lk5x3ucNi/lTwA=", - "path": "golang.org/x/text/unicode/norm", - "revision": "e19ae1496984b1c655b8044a65c0300a3c878dd3", - "revisionTime": "2017-12-24T20:31:28Z" - }, - { - "checksumSHA1": "EooPqEpEyY/7NCRwHDMWhhlkQNw=", - "path": "google.golang.org/api/gensupport", - "revision": "f7618f4b41caffc0e9f141e6f67957587341dde2", - "revisionTime": "2018-02-02T00:03:29Z" - }, - { - "checksumSHA1": "BWKmb7kGYbfbvXO6E7tCpTh9zKE=", - "path": "google.golang.org/api/googleapi", - "revision": "f7618f4b41caffc0e9f141e6f67957587341dde2", - "revisionTime": "2018-02-02T00:03:29Z" - }, - { - "checksumSHA1": "1K0JxrUfDqAB3MyRiU1LKjfHyf4=", - "path": "google.golang.org/api/googleapi/internal/uritemplates", - "revision": "f7618f4b41caffc0e9f141e6f67957587341dde2", - "revisionTime": "2018-02-02T00:03:29Z" - }, - { - "checksumSHA1": "Mr2fXhMRzlQCgANFm91s536pG7E=", - "path": "google.golang.org/api/googleapi/transport", - "revision": "f7618f4b41caffc0e9f141e6f67957587341dde2", - "revisionTime": "2018-02-02T00:03:29Z" - }, - { - "checksumSHA1": "CpjSGeyQJbLLPxVl/CWs5o9p+jU=", - "path": "google.golang.org/api/internal", - "revision": "f7618f4b41caffc0e9f141e6f67957587341dde2", - "revisionTime": "2018-02-02T00:03:29Z" - }, - { - "checksumSHA1": "HXuMQALvqd+ZLG0pC1l7gX8nNyE=", - "path": "google.golang.org/api/iterator", - "revision": "f7618f4b41caffc0e9f141e6f67957587341dde2", - "revisionTime": "2018-02-02T00:03:29Z" - }, - { - "checksumSHA1": "Z9LQvCPO0WV9PdjgIXlfVOGZRlM=", - "path": "google.golang.org/api/option", - "revision": "f7618f4b41caffc0e9f141e6f67957587341dde2", - "revisionTime": "2018-02-02T00:03:29Z" - }, - { - "checksumSHA1": "wO2s4Y+8FI6NciOpPPEeDK4/cH8=", - "path": "google.golang.org/api/storage/v1", - "revision": "f7618f4b41caffc0e9f141e6f67957587341dde2", - "revisionTime": "2018-02-02T00:03:29Z" - }, - { - "checksumSHA1": "ykzqoYJiMCS6LGBq/zszKFbxGeA=", - "path": "google.golang.org/api/transport/http", - "revision": "f7618f4b41caffc0e9f141e6f67957587341dde2", - "revisionTime": "2018-02-02T00:03:29Z" - }, - { - "checksumSHA1": "QoM8iwt2FVbTHR+Lav3dXmEu/7o=", - "path": "google.golang.org/appengine", - "revision": "5bee14b453b4c71be47ec1781b0fa61c2ea182db", - "revisionTime": "2017-12-12T22:30:47Z" - }, - { - "checksumSHA1": "NA+ebc/RfKLZ+wxPs3lRn94H3gA=", - "path": "google.golang.org/appengine/internal", - "revision": "5bee14b453b4c71be47ec1781b0fa61c2ea182db", - "revisionTime": "2017-12-12T22:30:47Z" - }, - { - "checksumSHA1": "x6Thdfyasqd68dWZWqzWWeIfAfI=", - "path": "google.golang.org/appengine/internal/app_identity", - "revision": "5bee14b453b4c71be47ec1781b0fa61c2ea182db", - "revisionTime": "2017-12-12T22:30:47Z" - }, - { - "checksumSHA1": "TsNO8P0xUlLNyh3Ic/tzSp/fDWM=", - "path": "google.golang.org/appengine/internal/base", - "revision": "5bee14b453b4c71be47ec1781b0fa61c2ea182db", - "revisionTime": "2017-12-12T22:30:47Z" - }, - { - "checksumSHA1": "5QsV5oLGSfKZqTCVXP6NRz5T4Tw=", - "path": "google.golang.org/appengine/internal/datastore", - "revision": "5bee14b453b4c71be47ec1781b0fa61c2ea182db", - "revisionTime": "2017-12-12T22:30:47Z" - }, - { - "checksumSHA1": "Gep2T9zmVYV8qZfK2gu3zrmG6QE=", - "path": "google.golang.org/appengine/internal/log", - "revision": "5bee14b453b4c71be47ec1781b0fa61c2ea182db", - "revisionTime": "2017-12-12T22:30:47Z" - }, - { - "checksumSHA1": "eLZVX1EHLclFtQnjDIszsdyWRHo=", - "path": "google.golang.org/appengine/internal/modules", - "revision": "5bee14b453b4c71be47ec1781b0fa61c2ea182db", - "revisionTime": "2017-12-12T22:30:47Z" - }, - { - "checksumSHA1": "a1XY7rz3BieOVqVI2Et6rKiwQCk=", - "path": "google.golang.org/appengine/internal/remote_api", - "revision": "5bee14b453b4c71be47ec1781b0fa61c2ea182db", - "revisionTime": "2017-12-12T22:30:47Z" - }, - { - "checksumSHA1": "QtAbHtHmDzcf6vOV9eqlCpKgjiw=", - "path": "google.golang.org/appengine/internal/urlfetch", - "revision": "5bee14b453b4c71be47ec1781b0fa61c2ea182db", - "revisionTime": "2017-12-12T22:30:47Z" - }, - { - "checksumSHA1": "akOV9pYnCbcPA8wJUutSQVibdyg=", - "path": "google.golang.org/appengine/urlfetch", - "revision": "5bee14b453b4c71be47ec1781b0fa61c2ea182db", - "revisionTime": "2017-12-12T22:30:47Z" - }, - { - "checksumSHA1": "GkjRB7ms/necD0ePmzqT6gDsu+4=", - "path": "google.golang.org/genproto/googleapis/api/annotations", - "revision": "4eb30f4778eed4c258ba66527a0d4f9ec8a36c45", - "revisionTime": "2018-01-25T08:06:56Z" - }, - { - "checksumSHA1": "auPKasjLqxoK/Du/izQcyKCjE7c=", - "path": "google.golang.org/genproto/googleapis/iam/v1", - "revision": "4eb30f4778eed4c258ba66527a0d4f9ec8a36c45", - "revisionTime": "2018-01-25T08:06:56Z" - }, - { - "checksumSHA1": "Tc3BU26zThLzcyqbVtiSEp7EpU8=", - "path": "google.golang.org/genproto/googleapis/rpc/status", - "revision": "4eb30f4778eed4c258ba66527a0d4f9ec8a36c45", - "revisionTime": "2018-01-25T08:06:56Z" - }, - { - "checksumSHA1": "0+ixS0s6A6gdRBpBe+6pmOSQoVk=", - "path": "google.golang.org/grpc", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "xBhmO0Vn4kzbmySioX+2gBImrkk=", - "path": "google.golang.org/grpc/balancer", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "CPWX/IgaQSR3+78j4sPrvHNkW+U=", - "path": "google.golang.org/grpc/balancer/base", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "DJ1AtOk4Pu7bqtUMob95Hw8HPNw=", - "path": "google.golang.org/grpc/balancer/roundrobin", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "j8Qs+yfgwYYOtodB/1bSlbzV5rs=", - "path": "google.golang.org/grpc/codes", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "XH2WYcDNwVO47zYShREJjcYXm0Y=", - "path": "google.golang.org/grpc/connectivity", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "KthiDKNPHMeIu967enqtE4NaZzI=", - "path": "google.golang.org/grpc/credentials", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "mJTBJC0n9J2CV+tHX+dJosYOZmg=", - "path": "google.golang.org/grpc/encoding", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "LKKkn7EYA+Do9Qwb2/SUKLFNxoo=", - "path": "google.golang.org/grpc/encoding/proto", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "H7SuPUqbPcdbNqgl+k3ohuwMAwE=", - "path": "google.golang.org/grpc/grpclb/grpc_lb_v1/messages", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "ntHev01vgZgeIh5VFRmbLx/BSTo=", - "path": "google.golang.org/grpc/grpclog", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "Qvf3zdmRCSsiM/VoBv0qB/naHtU=", - "path": "google.golang.org/grpc/internal", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "hcuHgKp8W0wIzoCnNfKI8NUss5o=", - "path": "google.golang.org/grpc/keepalive", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "4UsKpzk7AgcAISi3p11vW66nbJI=", - "path": "google.golang.org/grpc/metadata", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "5dwF592DPvhF2Wcex3m7iV6aGRQ=", - "path": "google.golang.org/grpc/naming", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "n5EgDdBqFMa2KQFhtl+FF/4gIFo=", - "path": "google.golang.org/grpc/peer", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "y8Ta+ctMP9CUTiPyPyxiD154d8w=", - "path": "google.golang.org/grpc/resolver", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "WpWF+bDzObsHf+bjoGpb/abeFxo=", - "path": "google.golang.org/grpc/resolver/dns", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "zs9M4xE8Lyg4wvuYvR00XoBxmuw=", - "path": "google.golang.org/grpc/resolver/passthrough", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "G9lgXNi7qClo5sM2s6TbTHLFR3g=", - "path": "google.golang.org/grpc/stats", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "tUo+M0Cb0W9ZEIt5BH30wJz/Kjc=", - "path": "google.golang.org/grpc/status", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "qvArRhlrww5WvRmbyMF2mUfbJew=", - "path": "google.golang.org/grpc/tap", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "rk9Qbb14xfXM91p41SU1APrgP98=", - "path": "google.golang.org/grpc/transport", - "revision": "f9628db66d141773eefe7f72d9635677c830dbd8", - "revisionTime": "2018-02-01T19:38:14Z" - }, - { - "checksumSHA1": "cBdDkft9ir+lyLbeRQ4zCAoR0AY=", - "path": "willnorris.com/go/gifresize", - "revision": "6a222229fa0697e6da06ec80f8ffd0ada346669d", - "revisionTime": "2016-04-28T23:14:23Z" - } - ], - "rootPath": "willnorris.com/go/imageproxy" -}