Commit d8a9ea1
Eric Bower
·
2023-08-08 15:04:57 -0400 EDT
parent 7415be1
refactor: rework all structs
12 files changed,
+362,
-520
+0,
-16
| ... | ... | @@ -1,16 +0,0 @@ | |
| 1 | - | url: git.erock.io | |
| 2 | - | repos: | |
| 3 | - | - path: /home/erock/dev/pico/pico | |
| 4 | - | refs: | |
| 5 | - | - main | |
| 6 | - | - v1.0.0 | |
| 7 | - | desc: pico services - prose.sh, lists.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh | |
| 8 | - | - path: /home/erock/dev/pico/pico-ops | |
| 9 | - | refs: | |
| 10 | - | - main | |
| 11 | - | desc: infra for pico services | |
| 12 | - | - path: /home/erock/dev/app-ui | |
| 13 | - | refs: | |
| 14 | - | - main | |
| 15 | - | - v50 | |
| 16 | - | desc: aptible's paas web application |
M
go.mod
+5,
-47
| ... | ... | @@ -3,74 +3,32 @@ module sr.ht/~erock/gemgit | |
| 3 | 3 | go 1.18 | |
| 4 | 4 | ||
| 5 | 5 | require ( | |
| 6 | + | github.com/alecthomas/chroma v0.10.0 | |
| 7 | + | github.com/dustin/go-humanize v1.0.0 | |
| 6 | 8 | github.com/gogs/git-module v1.6.0 | |
| 7 | 9 | github.com/mergestat/timediff v0.0.3 | |
| 8 | - | github.com/picosh/pico v1.1.6 | |
| 9 | 10 | github.com/spf13/viper v1.12.0 | |
| 10 | 11 | ) | |
| 11 | 12 | ||
| 12 | 13 | require ( | |
| 13 | - | github.com/alecthomas/chroma v0.10.0 // indirect | |
| 14 | - | github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect | |
| 15 | - | github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de // indirect | |
| 16 | - | github.com/aymerick/douceur v0.2.0 // indirect | |
| 17 | - | github.com/disintegration/imaging v1.6.2 // indirect | |
| 18 | 14 | github.com/dlclark/regexp2 v1.7.0 // indirect | |
| 19 | - | github.com/dsoprea/go-exif v0.0.0-20221012082141-d21ac8e2de85 // indirect | |
| 20 | - | github.com/dsoprea/go-exif/v2 v2.0.0-20221012082141-d21ac8e2de85 // indirect | |
| 21 | - | github.com/dsoprea/go-iptc v0.0.0-20200610044640-bc9ca208b413 // indirect | |
| 22 | - | github.com/dsoprea/go-logging v0.0.0-20200710184922-b02d349568dd // indirect | |
| 23 | - | github.com/dsoprea/go-photoshop-info-format v0.0.0-20200610045659-121dd752914d // indirect | |
| 24 | - | github.com/dsoprea/go-png-image-structure v0.0.0-20210512210324-29b889a6093d // indirect | |
| 25 | - | github.com/dsoprea/go-utility v0.0.0-20221003172846-a3e1774ef349 // indirect | |
| 26 | - | github.com/dustin/go-humanize v1.0.0 // indirect | |
| 27 | 15 | github.com/fsnotify/fsnotify v1.5.4 // indirect | |
| 28 | - | github.com/gliderlabs/ssh v0.3.5 // indirect | |
| 29 | - | github.com/go-errors/errors v1.4.2 // indirect | |
| 30 | - | github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect | |
| 31 | - | github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 // indirect | |
| 32 | - | github.com/google/uuid v1.3.0 // indirect | |
| 33 | - | github.com/gorilla/css v1.0.0 // indirect | |
| 34 | - | github.com/gorilla/feeds v1.1.1 // indirect | |
| 35 | 16 | github.com/hashicorp/hcl v1.0.0 // indirect | |
| 36 | - | github.com/json-iterator/go v1.1.12 // indirect | |
| 37 | - | github.com/klauspost/compress v1.15.13 // indirect | |
| 38 | - | github.com/klauspost/cpuid/v2 v2.2.2 // indirect | |
| 39 | - | github.com/kolesa-team/go-webp v1.0.2 // indirect | |
| 40 | - | github.com/lib/pq v1.10.7 // indirect | |
| 41 | 17 | github.com/magiconair/properties v1.8.6 // indirect | |
| 42 | 18 | github.com/mcuadros/go-version v0.0.0-20190308113854-92cdf37c5b75 // indirect | |
| 43 | - | github.com/microcosm-cc/bluemonday v1.0.21 // indirect | |
| 44 | - | github.com/minio/md5-simd v1.1.2 // indirect | |
| 45 | - | github.com/minio/minio-go/v7 v7.0.45 // indirect | |
| 46 | - | github.com/minio/sha256-simd v1.0.0 // indirect | |
| 47 | 19 | github.com/mitchellh/mapstructure v1.5.0 // indirect | |
| 48 | - | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | |
| 49 | - | github.com/modern-go/reflect2 v1.0.2 // indirect | |
| 50 | - | github.com/neurosnap/go-exif-remove v0.0.0-20221010134343-50d1e3c35577 // indirect | |
| 51 | - | github.com/neurosnap/go-jpeg-image-structure v0.0.0-20221010133817-70b1c1ff679e // indirect | |
| 52 | - | github.com/patrickmn/go-cache v2.1.0+incompatible // indirect | |
| 53 | 20 | github.com/pelletier/go-toml v1.9.5 // indirect | |
| 54 | 21 | github.com/pelletier/go-toml/v2 v2.0.1 // indirect | |
| 55 | - | github.com/rs/xid v1.4.0 // indirect | |
| 56 | - | github.com/sirupsen/logrus v1.9.0 // indirect | |
| 57 | 22 | github.com/spf13/afero v1.8.2 // indirect | |
| 58 | 23 | github.com/spf13/cast v1.5.0 // indirect | |
| 59 | 24 | github.com/spf13/jwalterweatherman v1.1.0 // indirect | |
| 60 | 25 | github.com/spf13/pflag v1.0.5 // indirect | |
| 26 | + | github.com/stretchr/testify v1.8.0 // indirect | |
| 61 | 27 | github.com/subosito/gotenv v1.3.0 // indirect | |
| 62 | - | github.com/yuin/goldmark v1.5.3 // indirect | |
| 63 | - | github.com/yuin/goldmark-highlighting v0.0.0-20220208100518-594be1970594 // indirect | |
| 64 | - | github.com/yuin/goldmark-meta v1.1.0 // indirect | |
| 65 | - | go.uber.org/atomic v1.10.0 // indirect | |
| 66 | - | go.uber.org/multierr v1.8.0 // indirect | |
| 67 | - | go.uber.org/zap v1.24.0 // indirect | |
| 68 | - | golang.org/x/crypto v0.4.0 // indirect | |
| 69 | - | golang.org/x/exp v0.0.0-20221211140036-ad323defaf05 // indirect | |
| 70 | - | golang.org/x/image v0.2.0 // indirect | |
| 71 | - | golang.org/x/net v0.4.0 // indirect | |
| 28 | + | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect | |
| 72 | 29 | golang.org/x/sys v0.3.0 // indirect | |
| 73 | 30 | golang.org/x/text v0.5.0 // indirect | |
| 31 | + | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect | |
| 74 | 32 | gopkg.in/ini.v1 v1.67.0 // indirect | |
| 75 | 33 | gopkg.in/yaml.v2 v2.4.0 // indirect | |
| 76 | 34 | gopkg.in/yaml.v3 v3.0.1 // indirect |
M
go.sum
+3,
-147
| ... | ... | @@ -40,13 +40,6 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 | |
| 40 | 40 | github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= | |
| 41 | 41 | github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= | |
| 42 | 42 | github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= | |
| 43 | - | github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= | |
| 44 | - | github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= | |
| 45 | - | github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de h1:FxWPpzIjnTlhPwqqXc4/vE0f7GvRjuAsbW+HOIe8KnA= | |
| 46 | - | github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de/go.mod h1:DCaWoUhZrYW9p1lxo/cm8EmUOOzAPSEZNGF2DK1dJgw= | |
| 47 | - | github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= | |
| 48 | - | github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= | |
| 49 | - | github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= | |
| 50 | 43 | github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= | |
| 51 | 44 | github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= | |
| 52 | 45 | github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= |
| ... | ... | @@ -58,35 +51,9 @@ github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnht | |
| 58 | 51 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | |
| 59 | 52 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | |
| 60 | 53 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | |
| 61 | - | github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c= | |
| 62 | - | github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4= | |
| 63 | 54 | github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= | |
| 64 | 55 | github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo= | |
| 65 | 56 | github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= | |
| 66 | - | github.com/dsoprea/go-exif v0.0.0-20221012082141-d21ac8e2de85 h1:+wKSjK8wh5Ybb63Fx1QvTSIfWU/n1nmqEzZy+82pqbQ= | |
| 67 | - | github.com/dsoprea/go-exif v0.0.0-20221012082141-d21ac8e2de85/go.mod h1:lOaOt7+UEppOgyvRy749v3do836U/hw0YVJNjoyPaEs= | |
| 68 | - | github.com/dsoprea/go-exif/v2 v2.0.0-20200321225314-640175a69fe4/go.mod h1:Lm2lMM2zx8p4a34ZemkaUV95AnMl4ZvLbCUbwOvLC2E= | |
| 69 | - | github.com/dsoprea/go-exif/v2 v2.0.0-20200604193436-ca8584a0e1c4/go.mod h1:9EXlPeHfblFFnwu5UOqmP2eoZfJyAZ2Ri/Vki33ajO0= | |
| 70 | - | github.com/dsoprea/go-exif/v2 v2.0.0-20221012082141-d21ac8e2de85 h1:sgMOHQHMiddteUitH9QYgaRTwAcqqr5X9z5j4yNXDuY= | |
| 71 | - | github.com/dsoprea/go-exif/v2 v2.0.0-20221012082141-d21ac8e2de85/go.mod h1:oKrjk2kb3rAR5NbtSTLUMvMSbc+k8ZosI3MaVH47noc= | |
| 72 | - | github.com/dsoprea/go-exif/v3 v3.0.0-20200717053412-08f1b6708903/go.mod h1:0nsO1ce0mh5czxGeLo4+OCZ/C6Eo6ZlMWsz7rH/Gxv8= | |
| 73 | - | github.com/dsoprea/go-exif/v3 v3.0.0-20210512043655-120bcdb2a55e/go.mod h1:cg5SNYKHMmzxsr9X6ZeLh/nfBRHHp5PngtEPcujONtk= | |
| 74 | - | github.com/dsoprea/go-iptc v0.0.0-20200609062250-162ae6b44feb/go.mod h1:kYIdx9N9NaOyD7U6D+YtExN7QhRm+5kq7//yOsRXQtM= | |
| 75 | - | github.com/dsoprea/go-iptc v0.0.0-20200610044640-bc9ca208b413 h1:YDRiMEm32T60Kpm35YzOK9ZHgjsS1Qrid+XskNcsdp8= | |
| 76 | - | github.com/dsoprea/go-iptc v0.0.0-20200610044640-bc9ca208b413/go.mod h1:kYIdx9N9NaOyD7U6D+YtExN7QhRm+5kq7//yOsRXQtM= | |
| 77 | - | github.com/dsoprea/go-logging v0.0.0-20190624164917-c4f10aab7696/go.mod h1:Nm/x2ZUNRW6Fe5C3LxdY1PyZY5wmDv/s5dkPJ/VB3iA= | |
| 78 | - | github.com/dsoprea/go-logging v0.0.0-20200517223158-a10564966e9d/go.mod h1:7I+3Pe2o/YSU88W0hWlm9S22W7XI1JFNJ86U0zPKMf8= | |
| 79 | - | github.com/dsoprea/go-logging v0.0.0-20200710184922-b02d349568dd h1:l+vLbuxptsC6VQyQsfD7NnEC8BZuFpz45PgY+pH8YTg= | |
| 80 | - | github.com/dsoprea/go-logging v0.0.0-20200710184922-b02d349568dd/go.mod h1:7I+3Pe2o/YSU88W0hWlm9S22W7XI1JFNJ86U0zPKMf8= | |
| 81 | - | github.com/dsoprea/go-photoshop-info-format v0.0.0-20200609050348-3db9b63b202c/go.mod h1:pqKB+ijp27cEcrHxhXVgUUMlSDRuGJJp1E+20Lj5H0E= | |
| 82 | - | github.com/dsoprea/go-photoshop-info-format v0.0.0-20200610045659-121dd752914d h1:dg6UMHa50VI01WuPWXPbNJpO8QSyvIF5T5n2IZiqX3A= | |
| 83 | - | github.com/dsoprea/go-photoshop-info-format v0.0.0-20200610045659-121dd752914d/go.mod h1:pqKB+ijp27cEcrHxhXVgUUMlSDRuGJJp1E+20Lj5H0E= | |
| 84 | - | github.com/dsoprea/go-png-image-structure v0.0.0-20210512210324-29b889a6093d h1:8+qI8ant/vZkNSsbwSjIR6XJfWcDVTg/qx/3pRUUZNA= | |
| 85 | - | github.com/dsoprea/go-png-image-structure v0.0.0-20210512210324-29b889a6093d/go.mod h1:yTR3tKgyk20phAFg6IE9ulMA5NjEDD2wyx+okRFLVtw= | |
| 86 | - | github.com/dsoprea/go-utility v0.0.0-20200711062821-fab8125e9bdf/go.mod h1:95+K3z2L0mqsVYd6yveIv1lmtT3tcQQ3dVakPySffW8= | |
| 87 | - | github.com/dsoprea/go-utility v0.0.0-20221003172846-a3e1774ef349 h1:/py11NlxDaOxkT9OKN+gXgT+QOH5xj1ZRoyusfRIlo4= | |
| 88 | - | github.com/dsoprea/go-utility v0.0.0-20221003172846-a3e1774ef349/go.mod h1:KVK+/Hul09ujXAGq+42UBgCTnXkiJZRnLYdURGjQUwo= | |
| 89 | - | github.com/dsoprea/go-utility/v2 v2.0.0-20200717064901-2fccff4aa15e/go.mod h1:uAzdkPTub5Y9yQwXe8W4m2XuP0tK4a9Q/dantD0+uaU= | |
| 90 | 57 | github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= | |
| 91 | 58 | github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= | |
| 92 | 59 | github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= |
| ... | ... | @@ -98,25 +65,11 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 | |
| 98 | 65 | github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= | |
| 99 | 66 | github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= | |
| 100 | 67 | github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= | |
| 101 | - | github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= | |
| 102 | - | github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= | |
| 103 | - | github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= | |
| 104 | - | github.com/go-errors/errors v1.0.2/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWEp4lssFEs= | |
| 105 | - | github.com/go-errors/errors v1.1.1/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWEp4lssFEs= | |
| 106 | - | github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= | |
| 107 | - | github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= | |
| 108 | 68 | github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= | |
| 109 | 69 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= | |
| 110 | 70 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= | |
| 111 | - | github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= | |
| 112 | - | github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80U= | |
| 113 | - | github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= | |
| 114 | 71 | github.com/gogs/git-module v1.6.0 h1:71GdRM9/pFxGgSUz8t2DKmm3RYuHUnTjsOuFInJXnkM= | |
| 115 | 72 | github.com/gogs/git-module v1.6.0/go.mod h1:8jFYhDxLUwEOhM2709l2CJXmoIIslobU1xszpT0NcAI= | |
| 116 | - | github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= | |
| 117 | - | github.com/golang/geo v0.0.0-20200319012246-673a6f80352d/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= | |
| 118 | - | github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 h1:gtexQ/VGyN+VVFRXSFiguSNcXmS6rkKT+X7FdIrTtfo= | |
| 119 | - | github.com/golang/geo v0.0.0-20210211234256-740aa86cb551/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= | |
| 120 | 73 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= | |
| 121 | 74 | github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= | |
| 122 | 75 | github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= |
| ... | ... | @@ -154,7 +107,6 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ | |
| 154 | 107 | github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | |
| 155 | 108 | github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | |
| 156 | 109 | github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= | |
| 157 | - | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= | |
| 158 | 110 | github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= | |
| 159 | 111 | github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= | |
| 160 | 112 | github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= |
| ... | ... | @@ -170,92 +122,43 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe | |
| 170 | 122 | github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= | |
| 171 | 123 | github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= | |
| 172 | 124 | github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | |
| 173 | - | github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= | |
| 174 | - | github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | |
| 175 | 125 | github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= | |
| 176 | 126 | github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= | |
| 177 | 127 | github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= | |
| 178 | - | github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= | |
| 179 | - | github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= | |
| 180 | - | github.com/gorilla/feeds v1.1.1 h1:HwKXxqzcRNg9to+BbvJog4+f3s/xzvtZXICcQGutYfY= | |
| 181 | - | github.com/gorilla/feeds v1.1.1/go.mod h1:Nk0jZrvPFZX1OBe5NPiddPw7CfwF6Q9eqzaBbaightA= | |
| 182 | 128 | github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= | |
| 183 | 129 | github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= | |
| 184 | 130 | github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= | |
| 185 | 131 | github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= | |
| 186 | 132 | github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= | |
| 187 | 133 | github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= | |
| 188 | - | github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= | |
| 189 | - | github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= | |
| 190 | - | github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= | |
| 191 | 134 | github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= | |
| 192 | 135 | github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= | |
| 193 | 136 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= | |
| 194 | - | github.com/klauspost/compress v1.15.13 h1:NFn1Wr8cfnenSJSA46lLq4wHCcBzKTSjnBIexDMMOV0= | |
| 195 | - | github.com/klauspost/compress v1.15.13/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= | |
| 196 | - | github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= | |
| 197 | - | github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= | |
| 198 | - | github.com/klauspost/cpuid/v2 v2.2.2 h1:xPMwiykqNK9VK0NYC3+jTMYv9I6Vl3YdjZgPZKG3zO0= | |
| 199 | - | github.com/klauspost/cpuid/v2 v2.2.2/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= | |
| 200 | - | github.com/kolesa-team/go-webp v1.0.2 h1:XCrWqxI7tNOI3dr0YufD9TUb+54vBDogg9KsHH7q5Lc= | |
| 201 | - | github.com/kolesa-team/go-webp v1.0.2/go.mod h1:oMvdivD6K+Q5qIIkVC2w4k2ZUnI1H+MyP7inwgWq9aA= | |
| 202 | 137 | github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= | |
| 203 | 138 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= | |
| 204 | 139 | github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= | |
| 205 | 140 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= | |
| 206 | 141 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= | |
| 207 | 142 | github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= | |
| 208 | - | github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= | |
| 209 | - | github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= | |
| 210 | 143 | github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= | |
| 211 | 144 | github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= | |
| 212 | - | github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= | |
| 213 | - | github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= | |
| 214 | 145 | github.com/mcuadros/go-version v0.0.0-20190308113854-92cdf37c5b75 h1:Pijfgr7ZuvX7QIQiEwLdRVr3RoMG+i0SbBO1Qu+7yVk= | |
| 215 | 146 | github.com/mcuadros/go-version v0.0.0-20190308113854-92cdf37c5b75/go.mod h1:76rfSfYPWj01Z85hUf/ituArm797mNKcvINh1OlsZKo= | |
| 216 | 147 | github.com/mergestat/timediff v0.0.3 h1:ucCNh4/ZrTPjFZ081PccNbhx9spymCJkFxSzgVuPU+Y= | |
| 217 | 148 | github.com/mergestat/timediff v0.0.3/go.mod h1:yvMUaRu2oetc+9IbPLYBJviz6sA7xz8OXMDfhBl7YSI= | |
| 218 | - | github.com/microcosm-cc/bluemonday v1.0.21 h1:dNH3e4PSyE4vNX+KlRGHT5KrSvjeUkoNPwEORjffHJg= | |
| 219 | - | github.com/microcosm-cc/bluemonday v1.0.21/go.mod h1:ytNkv4RrDrLJ2pqlsSI46O6IVXmZOBBD4SaJyDwwTkM= | |
| 220 | - | github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= | |
| 221 | - | github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= | |
| 222 | - | github.com/minio/minio-go/v7 v7.0.45 h1:g4IeM9M9pW/Lo8AGGNOjBZYlvmtlE1N5TQEYWXRWzIs= | |
| 223 | - | github.com/minio/minio-go/v7 v7.0.45/go.mod h1:nCrRzjoSUQh8hgKKtu3Y708OLvRLtuASMg2/nvmbarw= | |
| 224 | - | github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= | |
| 225 | - | github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= | |
| 226 | 149 | github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= | |
| 227 | 150 | github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= | |
| 228 | - | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= | |
| 229 | - | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= | |
| 230 | - | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= | |
| 231 | - | github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= | |
| 232 | - | github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= | |
| 233 | - | github.com/neurosnap/go-exif-remove v0.0.0-20221010134343-50d1e3c35577 h1:hVmVNttSLNloGsbFKVXAUHonXTd8KKrv30U/8UkloKI= | |
| 234 | - | github.com/neurosnap/go-exif-remove v0.0.0-20221010134343-50d1e3c35577/go.mod h1:G3Cu1AW+dmRLDFpOi8eUAfc3cGoRHUjTkGjeRcndgl4= | |
| 235 | - | github.com/neurosnap/go-jpeg-image-structure v0.0.0-20221010133817-70b1c1ff679e h1:76Dng5ms0fR+26doKZAvNqhi2UPfnLxGfPIDEr+BBlM= | |
| 236 | - | github.com/neurosnap/go-jpeg-image-structure v0.0.0-20221010133817-70b1c1ff679e/go.mod h1:nZBDA7+RD63GDJwjZmxhxac65MJqiCIHUUUvdYOsFkk= | |
| 237 | - | github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= | |
| 238 | - | github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= | |
| 239 | 151 | github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= | |
| 240 | 152 | github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= | |
| 241 | 153 | github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU= | |
| 242 | 154 | github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= | |
| 243 | - | github.com/picosh/pico v1.1.6 h1:Kw0gP/WVOwD9DkvEfTFt84pXJSv4yKI4n9ncIJHpOnQ= | |
| 244 | - | github.com/picosh/pico v1.1.6/go.mod h1:dbiKZsgsm/4KWzN6g4hCkqPj4itd9KzplPYZqs1JWLg= | |
| 245 | - | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= | |
| 246 | 155 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | |
| 247 | 156 | github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= | |
| 248 | 157 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= | |
| 249 | 158 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= | |
| 250 | 159 | github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= | |
| 251 | - | github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= | |
| 252 | 160 | github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= | |
| 253 | 161 | github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= | |
| 254 | - | github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= | |
| 255 | - | github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= | |
| 256 | - | github.com/scylladb/termtables v0.0.0-20191203121021-c4c0b6d42ff4/go.mod h1:C1a7PQSMz9NShzorzCiG2fk9+xuCgLkPeCvMHYR2OWg= | |
| 257 | - | github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= | |
| 258 | - | github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= | |
| 259 | 162 | github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= | |
| 260 | 163 | github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= | |
| 261 | 164 | github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= |
| ... | ... | @@ -267,52 +170,33 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An | |
| 267 | 170 | github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= | |
| 268 | 171 | github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= | |
| 269 | 172 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= | |
| 173 | + | github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= | |
| 270 | 174 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= | |
| 271 | - | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= | |
| 272 | 175 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= | |
| 273 | 176 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= | |
| 274 | 177 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= | |
| 275 | 178 | github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= | |
| 276 | 179 | github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= | |
| 180 | + | github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= | |
| 277 | 181 | github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= | |
| 278 | 182 | github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= | |
| 279 | 183 | github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= | |
| 280 | 184 | github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= | |
| 281 | 185 | github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= | |
| 282 | 186 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= | |
| 283 | - | github.com/yuin/goldmark v1.4.5/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg= | |
| 284 | - | github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= | |
| 285 | - | github.com/yuin/goldmark v1.5.3 h1:3HUJmBFbQW9fhQOzMgseU134xfi6hU+mjWywx5Ty+/M= | |
| 286 | - | github.com/yuin/goldmark v1.5.3/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= | |
| 287 | - | github.com/yuin/goldmark-highlighting v0.0.0-20220208100518-594be1970594 h1:yHfZyN55+5dp1wG7wDKv8HQ044moxkyGq12KFFMFDxg= | |
| 288 | - | github.com/yuin/goldmark-highlighting v0.0.0-20220208100518-594be1970594/go.mod h1:U9ihbh+1ZN7fR5Se3daSPoz1CGF9IYtSvWwVQtnzGHU= | |
| 289 | - | github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUeiOUc= | |
| 290 | - | github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0= | |
| 291 | 187 | go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= | |
| 292 | 188 | go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= | |
| 293 | 189 | go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= | |
| 294 | 190 | go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= | |
| 295 | 191 | go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= | |
| 296 | 192 | go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= | |
| 297 | - | go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= | |
| 298 | - | go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= | |
| 299 | - | go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= | |
| 300 | - | go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= | |
| 301 | - | go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= | |
| 302 | - | go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= | |
| 303 | - | go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= | |
| 304 | - | go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= | |
| 305 | 193 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= | |
| 306 | 194 | golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= | |
| 307 | 195 | golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= | |
| 308 | 196 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= | |
| 309 | 197 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= | |
| 310 | 198 | golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= | |
| 311 | - | golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= | |
| 312 | 199 | golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= | |
| 313 | - | golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= | |
| 314 | - | golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8= | |
| 315 | - | golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80= | |
| 316 | 200 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= | |
| 317 | 201 | golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= | |
| 318 | 202 | golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= |
| ... | ... | @@ -323,14 +207,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 | |
| 323 | 207 | golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= | |
| 324 | 208 | golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= | |
| 325 | 209 | golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= | |
| 326 | - | golang.org/x/exp v0.0.0-20221211140036-ad323defaf05 h1:T8EldfGCcveFMewH5xAYxxoX3PSQMrsechlUGVFlQBU= | |
| 327 | - | golang.org/x/exp v0.0.0-20221211140036-ad323defaf05/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= | |
| 328 | 210 | golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= | |
| 329 | 211 | golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= | |
| 330 | - | golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= | |
| 331 | - | golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= | |
| 332 | - | golang.org/x/image v0.2.0 h1:/DcQ0w3VHKCC5p0/P2B0JpAZ9Z++V2KOo2fyU89CXBQ= | |
| 333 | - | golang.org/x/image v0.2.0/go.mod h1:la7oBXb9w3YFjBqaAwtynVioc1ZvOnNteUNrifGNmAI= | |
| 334 | 212 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= | |
| 335 | 213 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= | |
| 336 | 214 | golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= |
| ... | ... | @@ -352,7 +230,6 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= | |
| 352 | 230 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= | |
| 353 | 231 | golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= | |
| 354 | 232 | golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= | |
| 355 | - | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= | |
| 356 | 233 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | |
| 357 | 234 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | |
| 358 | 235 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
| ... | ... | @@ -371,7 +248,6 @@ golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLL | |
| 371 | 248 | golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | |
| 372 | 249 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | |
| 373 | 250 | golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | |
| 374 | - | golang.org/x/net v0.0.0-20200320220750-118fecf932d8/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | |
| 375 | 251 | golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= | |
| 376 | 252 | golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= | |
| 377 | 253 | golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= |
| ... | ... | @@ -385,11 +261,6 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY | |
| 385 | 261 | golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= | |
| 386 | 262 | golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= | |
| 387 | 263 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= | |
| 388 | - | golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= | |
| 389 | - | golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= | |
| 390 | - | golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= | |
| 391 | - | golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= | |
| 392 | - | golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= | |
| 393 | 264 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= | |
| 394 | 265 | golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= | |
| 395 | 266 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= |
| ... | ... | @@ -443,30 +314,18 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w | |
| 443 | 314 | golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | |
| 444 | 315 | golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | |
| 445 | 316 | golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | |
| 446 | - | golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | |
| 447 | 317 | golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | |
| 448 | 318 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| 449 | 319 | golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| 450 | - | golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| 451 | - | golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| 452 | - | golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| 453 | - | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| 454 | - | golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| 455 | - | golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| 456 | 320 | golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= | |
| 457 | 321 | golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| 458 | 322 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= | |
| 459 | - | golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= | |
| 460 | - | golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= | |
| 461 | - | golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= | |
| 462 | 323 | golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= | |
| 463 | 324 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= | |
| 464 | 325 | golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= | |
| 465 | 326 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= | |
| 466 | 327 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= | |
| 467 | 328 | golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= | |
| 468 | - | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= | |
| 469 | - | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= | |
| 470 | 329 | golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= | |
| 471 | 330 | golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= | |
| 472 | 331 | golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= |
| ... | ... | @@ -519,7 +378,6 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f | |
| 519 | 378 | golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= | |
| 520 | 379 | golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= | |
| 521 | 380 | golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= | |
| 522 | - | golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= | |
| 523 | 381 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | |
| 524 | 382 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | |
| 525 | 383 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= |
| ... | ... | @@ -615,16 +473,14 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba | |
| 615 | 473 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | |
| 616 | 474 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | |
| 617 | 475 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= | |
| 476 | + | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | |
| 618 | 477 | gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= | |
| 619 | 478 | gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= | |
| 620 | 479 | gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= | |
| 621 | 480 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | |
| 622 | - | gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | |
| 623 | - | gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | |
| 624 | 481 | gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= | |
| 625 | 482 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= | |
| 626 | 483 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | |
| 627 | - | gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | |
| 628 | 484 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= | |
| 629 | 485 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | |
| 630 | 486 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= |
+10,
-10
| ... | ... | @@ -6,29 +6,29 @@ | |
| 6 | 6 | ||
| 7 | 7 | <dl> | |
| 8 | 8 | <dt>commit</dt> | |
| 9 | - | <dd><a href="{{.Data.CommitURL}}">{{.Data.CommitID}}</a></dd> | |
| 9 | + | <dd><a href="{{.CommitURL}}">{{.CommitID}}</a></dd> | |
| 10 | 10 | ||
| 11 | 11 | <dt>parent</dt> | |
| 12 | - | <dd><a href="{{.Data.ParentURL}}">{{.Data.Parent}}</a></dd> | |
| 12 | + | <dd><a href="{{.ParentURL}}">{{.Parent}}</a></dd> | |
| 13 | 13 | ||
| 14 | 14 | <dt>author</dt> | |
| 15 | - | <dd>{{.Data.Commit.Author.Name}}</dd> | |
| 15 | + | <dd>{{.Commit.Author.Name}}</dd> | |
| 16 | 16 | ||
| 17 | 17 | <dt>date</dt> | |
| 18 | - | <dd>{{.Data.Commit.Author.When}}</dd> | |
| 18 | + | <dd>{{.Commit.Author.When}}</dd> | |
| 19 | 19 | </dl> | |
| 20 | 20 | ||
| 21 | - | <pre>{{.Data.Commit.Message}}</pre> | |
| 21 | + | <pre>{{.Commit.Message}}</pre> | |
| 22 | 22 | ||
| 23 | 23 | <div class="box mono"> | |
| 24 | 24 | <div> | |
| 25 | - | <strong>{{.Data.Diff.NumFiles}}</strong> files changed, | |
| 26 | - | <span class="color-green">+{{.Data.Diff.TotalAdditions}}</span>, | |
| 27 | - | <span class="color-red">-{{.Data.Diff.TotalDeletions}}</span> | |
| 25 | + | <strong>{{.Diff.NumFiles}}</strong> files changed, | |
| 26 | + | <span class="color-green">+{{.Diff.TotalAdditions}}</span>, | |
| 27 | + | <span class="color-red">-{{.Diff.TotalDeletions}}</span> | |
| 28 | 28 | </div> | |
| 29 | 29 | ||
| 30 | 30 | <div> | |
| 31 | - | {{range .Data.Diff.Files}} | |
| 31 | + | {{range .Diff.Files}} | |
| 32 | 32 | <div class="my-sm"> | |
| 33 | 33 | <span>{{.FileType}}</span> | |
| 34 | 34 | <a href="#diff-{{.Name}}">{{.Name}}</a> |
| ... | ... | @@ -37,7 +37,7 @@ | |
| 37 | 37 | </div> | |
| 38 | 38 | </div> | |
| 39 | 39 | ||
| 40 | - | {{range .Data.Diff.Files}} | |
| 40 | + | {{range .Diff.Files}} | |
| 41 | 41 | <div id="diff-{{.Name}}" class="flex justify-between mono"> | |
| 42 | 42 | <span>{{.FileType}} {{if eq .FileType "R"}}{{.OldName}} => {{end}}{{.Name}}</span> | |
| 43 | 43 | <div> |
+2,
-2
| ... | ... | @@ -4,6 +4,6 @@ | |
| 4 | 4 | {{define "content"}} | |
| 5 | 5 | {{template "header" .}} | |
| 6 | 6 | ||
| 7 | - | <h1 class="text-lg">{{.Data.Path}}</h1> | |
| 8 | - | {{.Data.Contents}} | |
| 7 | + | <h1 class="text-lg">{{.Path}}</h1> | |
| 8 | + | {{.Contents}} | |
| 9 | 9 | {{end }} |
+7,
-7
| ... | ... | @@ -1,20 +1,20 @@ | |
| 1 | 1 | {{define "header"}} | |
| 2 | 2 | <h1 class="text-xl"> | |
| 3 | 3 | <a href="/">repos</a> | |
| 4 | - | <span> / {{.RepoName}}</span> | |
| 4 | + | <span> / {{.Repo.RepoName}}</span> | |
| 5 | 5 | </h1> | |
| 6 | 6 | ||
| 7 | 7 | <div class="text-lg"> | |
| 8 | - | <a href="{{.Repo.SummaryURL}}">summary</a> | | |
| 9 | - | <a href="{{.Repo.RefsURL}}">refs</a> | | |
| 10 | - | <span class="font-bold">{{.Repo.RevName}}</span> | | |
| 11 | - | <a href="{{.Repo.TreeURL}}">tree</a> | | |
| 12 | - | <a href="{{.Repo.LogURL}}">log</a> | |
| 8 | + | <a href="{{.SiteURLs.SummaryURL}}">summary</a> | | |
| 9 | + | <a href="{{.SiteURLs.RefsURL}}">refs</a> | | |
| 10 | + | <span class="font-bold">{{.RevData.RevName}}</span> | | |
| 11 | + | <a href="{{.RevData.TreeURL}}">tree</a> | | |
| 12 | + | <a href="{{.RevData.LogURL}}">log</a> | |
| 13 | 13 | </div> | |
| 14 | 14 | ||
| 15 | 15 | <div class="mt-lg"> | |
| 16 | 16 | <div class="text-lg">{{.Repo.Desc}}</div> | |
| 17 | - | <pre style="margin: 0;">git clone {{.Repo.CloneURL}}</pre> | |
| 17 | + | <pre style="margin: 0;">git clone {{.SiteURLs.CloneURL}}</pre> | |
| 18 | 18 | </div> | |
| 19 | 19 | ||
| 20 | 20 | <hr /> |
+0,
-19
| ... | ... | @@ -1,19 +0,0 @@ | |
| 1 | - | {{template "base" .}} | |
| 2 | - | ||
| 3 | - | {{define "title"}}index{{end}} | |
| 4 | - | ||
| 5 | - | {{define "content"}} | |
| 6 | - | <h1 class="text-xl">repos</h1> | |
| 7 | - | <div> | |
| 8 | - | {{range .RepoList}} | |
| 9 | - | <div class="my box"> | |
| 10 | - | <div class="flex justify-between items-center"> | |
| 11 | - | <div><a class="text-lg" href="{{.URL}}">{{.Name}}</a></div> | |
| 12 | - | <div class="text-sm">{{.CommitDate}}</div> | |
| 13 | - | </div> | |
| 14 | - | ||
| 15 | - | <div class="my">{{.Desc}}</div> | |
| 16 | - | </div> | |
| 17 | - | {{end}} | |
| 18 | - | </div> | |
| 19 | - | {{end}} |
+1,
-1
| ... | ... | @@ -6,7 +6,7 @@ | |
| 6 | 6 | {{template "header" .}} | |
| 7 | 7 | ||
| 8 | 8 | <div> | |
| 9 | - | {{range .Data.Log}} | |
| 9 | + | {{range .Logs}} | |
| 10 | 10 | <div class="box"> | |
| 11 | 11 | <div class="flex justify-between items-center"> | |
| 12 | 12 | <div> |
+1,
-1
| ... | ... | @@ -7,7 +7,7 @@ | |
| 7 | 7 | ||
| 8 | 8 | <h2 class="text-md font-bold">refs</h2> | |
| 9 | 9 | <ul> | |
| 10 | - | {{range .Data.Refs}} | |
| 10 | + | {{range .Refs}} | |
| 11 | 11 | {{if .URL}} | |
| 12 | 12 | <li><a href="{{.URL}}">{{.Refspec}}</a></li> | |
| 13 | 13 | {{else}} |
+1,
-1
| ... | ... | @@ -5,5 +5,5 @@ | |
| 5 | 5 | {{define "content"}} | |
| 6 | 6 | {{template "header" .}} | |
| 7 | 7 | ||
| 8 | - | {{.Data.Readme}} | |
| 8 | + | {{.Readme}} | |
| 9 | 9 | {{end}} |
+1,
-1
| ... | ... | @@ -6,7 +6,7 @@ | |
| 6 | 6 | {{template "header" .}} | |
| 7 | 7 | ||
| 8 | 8 | <div> | |
| 9 | - | {{range .Data.Tree}} | |
| 9 | + | {{range .Tree}} | |
| 10 | 10 | <div class="flex justify-between items-center gap my-sm border-b"> | |
| 11 | 11 | <div class="flex-1"> | |
| 12 | 12 | <a href="{{.URL}}">{{.Path}}</a> |
M
main.go
+331,
-268
| ... | ... | @@ -1,53 +1,74 @@ | |
| 1 | 1 | package main | |
| 2 | 2 | ||
| 3 | 3 | import ( | |
| 4 | + | "bytes" | |
| 5 | + | "embed" | |
| 6 | + | _ "embed" | |
| 7 | + | "flag" | |
| 4 | 8 | "fmt" | |
| 5 | 9 | "html/template" | |
| 6 | 10 | html "html/template" | |
| 11 | + | "math" | |
| 7 | 12 | "os" | |
| 8 | 13 | "path/filepath" | |
| 9 | 14 | "sort" | |
| 10 | 15 | "strings" | |
| 16 | + | "unicode/utf8" | |
| 11 | 17 | ||
| 18 | + | formatterHtml "github.com/alecthomas/chroma/formatters/html" | |
| 19 | + | "github.com/alecthomas/chroma/lexers" | |
| 20 | + | "github.com/alecthomas/chroma/styles" | |
| 12 | 21 | "github.com/dustin/go-humanize" | |
| 13 | 22 | git "github.com/gogs/git-module" | |
| 14 | 23 | "github.com/mergestat/timediff" | |
| 15 | - | "github.com/picosh/pico/pastes" | |
| 16 | - | "github.com/picosh/pico/shared" | |
| 17 | - | "github.com/spf13/viper" | |
| 18 | 24 | ) | |
| 19 | 25 | ||
| 26 | + | //go:embed html/*.tmpl | |
| 27 | + | var efs embed.FS | |
| 20 | 28 | var defaultBranches = []string{"main", "master"} | |
| 21 | 29 | ||
| 22 | - | type RepoItemData struct { | |
| 23 | - | URL string | |
| 24 | - | Name string | |
| 25 | - | Desc string | |
| 26 | - | CommitDate string | |
| 27 | - | LastCommit *git.Commit | |
| 28 | - | } | |
| 30 | + | type Config struct { | |
| 31 | + | // required params | |
| 32 | + | Outdir string | |
| 33 | + | // abs path to git repo | |
| 34 | + | RepoPath string | |
| 35 | + | ||
| 36 | + | // optional params | |
| 37 | + | // generate logs and trees based on the refs provided | |
| 38 | + | Refs []string | |
| 39 | + | // description of repo used in the header of site | |
| 40 | + | Desc string | |
| 41 | + | // maximum number of commits that we will process in descending order | |
| 42 | + | MaxCommits int | |
| 43 | + | // name of the readme file | |
| 44 | + | Readme string | |
| 45 | + | // In order to get the latest commit per file we do a `git rev-list {ref} {file}` | |
| 46 | + | // which is n+1 where n is a file in the tree. | |
| 47 | + | // We offer a way to disable showing the latest commit in the output | |
| 48 | + | // for those who want a faster build time | |
| 49 | + | HideTreeLastCommit bool | |
| 29 | 50 | ||
| 30 | - | type IndexPage struct { | |
| 31 | - | RepoList []*RepoItemData | |
| 51 | + | // user-defined urls | |
| 52 | + | HomeUrl template.URL | |
| 53 | + | CloneURL template.URL | |
| 54 | + | ||
| 55 | + | // computed | |
| 56 | + | // cache for skipping commits, trees, etc. | |
| 57 | + | Cache map[string]bool | |
| 58 | + | // pretty name for the repo | |
| 59 | + | RepoName string | |
| 32 | 60 | } | |
| 33 | 61 | ||
| 34 | - | type RepoData struct { | |
| 35 | - | Name string | |
| 36 | - | Desc string | |
| 37 | - | SummaryURL string | |
| 38 | - | TreeURL string | |
| 39 | - | LogURL string | |
| 40 | - | RefsURL string | |
| 41 | - | CloneURL string | |
| 42 | - | MaxCommits int | |
| 43 | - | RevName string | |
| 44 | - | Readme string | |
| 45 | - | HideTreeLastCommit bool | |
| 62 | + | type RevData struct { | |
| 63 | + | RevName string | |
| 64 | + | TreeURL template.URL | |
| 65 | + | LogURL template.URL | |
| 66 | + | Ref *git.Reference | |
| 46 | 67 | } | |
| 47 | 68 | ||
| 48 | 69 | type CommitData struct { | |
| 49 | 70 | SummaryStr string | |
| 50 | - | URL string | |
| 71 | + | URL template.URL | |
| 51 | 72 | WhenStr string | |
| 52 | 73 | AuthorStr string | |
| 53 | 74 | ShortID string |
| ... | ... | @@ -61,41 +82,11 @@ type TreeItem struct { | |
| 61 | 82 | URL string | |
| 62 | 83 | Path string | |
| 63 | 84 | Entry *git.TreeEntry | |
| 64 | - | CommitURL string | |
| 85 | + | CommitURL template.URL | |
| 65 | 86 | Summary string | |
| 66 | 87 | When string | |
| 67 | 88 | } | |
| 68 | 89 | ||
| 69 | - | type PageData struct { | |
| 70 | - | Repo *RepoData | |
| 71 | - | Log []*CommitData | |
| 72 | - | Tree []*TreeItem | |
| 73 | - | Readme template.HTML | |
| 74 | - | Rev *git.Reference | |
| 75 | - | RevName string | |
| 76 | - | Refs []*RefInfo | |
| 77 | - | } | |
| 78 | - | ||
| 79 | - | type CommitPageData struct { | |
| 80 | - | CommitMsg template.HTML | |
| 81 | - | CommitID string | |
| 82 | - | Commit *CommitData | |
| 83 | - | Diff *DiffRender | |
| 84 | - | Repo *RepoData | |
| 85 | - | Parent string | |
| 86 | - | ParentURL string | |
| 87 | - | CommitURL string | |
| 88 | - | } | |
| 89 | - | ||
| 90 | - | type WriteData struct { | |
| 91 | - | Name string | |
| 92 | - | Template string | |
| 93 | - | Data interface{} | |
| 94 | - | RepoName string | |
| 95 | - | Subdir string | |
| 96 | - | Repo *RepoData | |
| 97 | - | } | |
| 98 | - | ||
| 99 | 90 | type DiffRender struct { | |
| 100 | 91 | NumFiles int | |
| 101 | 92 | TotalAdditions int |
| ... | ... | @@ -114,11 +105,6 @@ type DiffRenderFile struct { | |
| 114 | 105 | NumDeletions int | |
| 115 | 106 | } | |
| 116 | 107 | ||
| 117 | - | type FileData struct { | |
| 118 | - | Contents template.HTML | |
| 119 | - | Path string | |
| 120 | - | } | |
| 121 | - | ||
| 122 | 108 | type RefInfo struct { | |
| 123 | 109 | Refspec string | |
| 124 | 110 | URL template.URL |
| ... | ... | @@ -129,19 +115,54 @@ type BranchOutput struct { | |
| 129 | 115 | LastCommit *git.Commit | |
| 130 | 116 | } | |
| 131 | 117 | ||
| 132 | - | type RepoConfig struct { | |
| 133 | - | Path string `mapstructure:"path"` | |
| 134 | - | Refs []string `mapstructure:"refs"` | |
| 135 | - | Desc string `mapstructure:"desc"` | |
| 136 | - | MaxCommits int `mapstructure:"max_commits"` | |
| 137 | - | Readme string `mapstructure:"readme"` | |
| 138 | - | HideTreeLastCommit bool `mapstructure:"hide_tree_last_commit"` | |
| 118 | + | type PageData struct { | |
| 119 | + | Repo *Config | |
| 120 | + | SiteURLs *SiteURLs | |
| 121 | + | RevData *RevData | |
| 139 | 122 | } | |
| 140 | 123 | ||
| 141 | - | type Config struct { | |
| 142 | - | Repos []*RepoConfig `mapstructure:"repos"` | |
| 143 | - | URL string `mapstructure:"url"` | |
| 144 | - | Cache map[string]bool | |
| 124 | + | type SummaryPageData struct { | |
| 125 | + | *PageData | |
| 126 | + | Readme template.HTML | |
| 127 | + | } | |
| 128 | + | ||
| 129 | + | type TreePageData struct { | |
| 130 | + | *PageData | |
| 131 | + | Tree []*TreeItem | |
| 132 | + | } | |
| 133 | + | ||
| 134 | + | type LogPageData struct { | |
| 135 | + | *PageData | |
| 136 | + | Logs []*CommitData | |
| 137 | + | } | |
| 138 | + | ||
| 139 | + | type FilePageData struct { | |
| 140 | + | *PageData | |
| 141 | + | Contents template.HTML | |
| 142 | + | Path string | |
| 143 | + | } | |
| 144 | + | ||
| 145 | + | type CommitPageData struct { | |
| 146 | + | *PageData | |
| 147 | + | CommitMsg template.HTML | |
| 148 | + | CommitID string | |
| 149 | + | Commit *CommitData | |
| 150 | + | Diff *DiffRender | |
| 151 | + | Parent string | |
| 152 | + | ParentURL template.URL | |
| 153 | + | CommitURL template.URL | |
| 154 | + | } | |
| 155 | + | ||
| 156 | + | type RefPageData struct { | |
| 157 | + | *PageData | |
| 158 | + | Refs []*RefInfo | |
| 159 | + | } | |
| 160 | + | ||
| 161 | + | type WriteData struct { | |
| 162 | + | Template string | |
| 163 | + | Filename string | |
| 164 | + | Subdir string | |
| 165 | + | Data interface{} | |
| 145 | 166 | } | |
| 146 | 167 | ||
| 147 | 168 | func diffFileType(_type git.DiffFileType) string { |
| ... | ... | @@ -164,12 +185,62 @@ func bail(err error) { | |
| 164 | 185 | } | |
| 165 | 186 | } | |
| 166 | 187 | ||
| 167 | - | func toPretty(b int64) string { | |
| 168 | - | return humanize.Bytes(uint64(b)) | |
| 188 | + | func parseText(filename string, text string) (string, error) { | |
| 189 | + | formatter := formatterHtml.New( | |
| 190 | + | formatterHtml.WithLineNumbers(true), | |
| 191 | + | formatterHtml.LinkableLineNumbers(true, ""), | |
| 192 | + | formatterHtml.WithClasses(true), | |
| 193 | + | ) | |
| 194 | + | lexer := lexers.Match(filename) | |
| 195 | + | if lexer == nil { | |
| 196 | + | lexer = lexers.Analyse(text) | |
| 197 | + | } | |
| 198 | + | if lexer == nil { | |
| 199 | + | lexer = lexers.Get("plaintext") | |
| 200 | + | } | |
| 201 | + | iterator, err := lexer.Tokenise(nil, text) | |
| 202 | + | if err != nil { | |
| 203 | + | return text, err | |
| 204 | + | } | |
| 205 | + | var buf bytes.Buffer | |
| 206 | + | err = formatter.Format(&buf, styles.Dracula, iterator) | |
| 207 | + | if err != nil { | |
| 208 | + | return text, err | |
| 209 | + | } | |
| 210 | + | return buf.String(), nil | |
| 169 | 211 | } | |
| 170 | 212 | ||
| 171 | - | func commitURL(repo string, commitID string) string { | |
| 172 | - | return fmt.Sprintf("/%s/commits/%s.html", repo, commitID) | |
| 213 | + | // isText reports whether a significant prefix of s looks like correct UTF-8; | |
| 214 | + | // that is, if it is likely that s is human-readable text. | |
| 215 | + | func isText(s string) bool { | |
| 216 | + | const max = 1024 // at least utf8.UTFMax | |
| 217 | + | if len(s) > max { | |
| 218 | + | s = s[0:max] | |
| 219 | + | } | |
| 220 | + | for i, c := range s { | |
| 221 | + | if i+utf8.UTFMax > len(s) { | |
| 222 | + | // last char may be incomplete - ignore | |
| 223 | + | break | |
| 224 | + | } | |
| 225 | + | if c == 0xFFFD || c < ' ' && c != '\n' && c != '\t' && c != '\f' && c != '\r' { | |
| 226 | + | // decoding error or control character - not a text file | |
| 227 | + | return false | |
| 228 | + | } | |
| 229 | + | } | |
| 230 | + | return true | |
| 231 | + | } | |
| 232 | + | ||
| 233 | + | // isTextFile reports whether the file has a known extension indicating | |
| 234 | + | // a text file, or if a significant chunk of the specified file looks like | |
| 235 | + | // correct UTF-8; that is, if it is likely that the file contains human- | |
| 236 | + | // readable text. | |
| 237 | + | func isTextFile(text string) bool { | |
| 238 | + | num := math.Min(float64(len(text)), 1024) | |
| 239 | + | return isText(text[0:int(num)]) | |
| 240 | + | } | |
| 241 | + | ||
| 242 | + | func toPretty(b int64) string { | |
| 243 | + | return humanize.Bytes(uint64(b)) | |
| 173 | 244 | } | |
| 174 | 245 | ||
| 175 | 246 | func repoName(root string) string { |
| ... | ... | @@ -177,7 +248,7 @@ func repoName(root string) string { | |
| 177 | 248 | return file | |
| 178 | 249 | } | |
| 179 | 250 | ||
| 180 | - | func readmeFile(repo *RepoData) string { | |
| 251 | + | func readmeFile(repo *Config) string { | |
| 181 | 252 | if repo.Readme == "" { | |
| 182 | 253 | return "readme.md" | |
| 183 | 254 | } |
| ... | ... | @@ -185,8 +256,8 @@ func readmeFile(repo *RepoData) string { | |
| 185 | 256 | return strings.ToLower(repo.Readme) | |
| 186 | 257 | } | |
| 187 | 258 | ||
| 188 | - | func findDefaultBranch(config *RepoConfig, refs []*git.Reference) *git.Reference { | |
| 189 | - | branches := config.Refs | |
| 259 | + | func (c *Config) findDefaultBranch(refs []*git.Reference) *git.Reference { | |
| 260 | + | branches := c.Refs | |
| 190 | 261 | if len(branches) == 0 { | |
| 191 | 262 | branches = defaultBranches | |
| 192 | 263 | } |
| ... | ... | @@ -207,13 +278,14 @@ func walkTree(tree *git.Tree, branch string, curpath string, aggregate []*TreeIt | |
| 207 | 278 | bail(err) | |
| 208 | 279 | ||
| 209 | 280 | for _, entry := range entries { | |
| 210 | - | fname := curpath + "/" + entry.Name() | |
| 211 | - | if entry.IsTree() { | |
| 281 | + | fname := filepath.Join(curpath, entry.Name()) | |
| 282 | + | typ := entry.Type() | |
| 283 | + | if typ == git.ObjectTree { | |
| 212 | 284 | re, _ := tree.Subtree(entry.Name()) | |
| 213 | 285 | aggregate = walkTree(re, branch, fname, aggregate) | |
| 214 | 286 | } | |
| 215 | 287 | ||
| 216 | - | if entry.IsBlob() { | |
| 288 | + | if entry.Type() == git.ObjectBlob { | |
| 217 | 289 | aggregate = append(aggregate, &TreeItem{ | |
| 218 | 290 | Size: toPretty(entry.Size()), | |
| 219 | 291 | Path: fname, |
| ... | ... | @@ -226,140 +298,115 @@ func walkTree(tree *git.Tree, branch string, curpath string, aggregate []*TreeIt | |
| 226 | 298 | return aggregate | |
| 227 | 299 | } | |
| 228 | 300 | ||
| 229 | - | func writeHtml(data *WriteData) { | |
| 230 | - | files := []string{data.Template} | |
| 231 | - | files = append( | |
| 232 | - | files, | |
| 233 | - | "./html/header.partial.tmpl", | |
| 234 | - | "./html/base.layout.tmpl", | |
| 301 | + | func (c *Config) writeHtml(writeData *WriteData) { | |
| 302 | + | ts, err := html.ParseFS( | |
| 303 | + | efs, | |
| 304 | + | writeData.Template, | |
| 305 | + | "html/header.partial.tmpl", | |
| 306 | + | "html/base.layout.tmpl", | |
| 235 | 307 | ) | |
| 236 | - | ||
| 237 | - | ts, err := html.ParseFiles(files...) | |
| 238 | 308 | bail(err) | |
| 239 | 309 | ||
| 240 | - | outdir := viper.GetString("outdir") | |
| 241 | - | dir := filepath.Join(outdir, data.RepoName, data.Subdir) | |
| 310 | + | dir := filepath.Join(c.Outdir, c.RepoName, writeData.Subdir) | |
| 242 | 311 | err = os.MkdirAll(dir, os.ModePerm) | |
| 243 | 312 | bail(err) | |
| 244 | 313 | ||
| 245 | - | fp := filepath.Join(dir, data.Name) | |
| 314 | + | fp := filepath.Join(dir, writeData.Filename) | |
| 246 | 315 | fmt.Printf("writing (%s)\n", fp) | |
| 247 | 316 | ||
| 248 | 317 | w, err := os.OpenFile(fp, os.O_WRONLY|os.O_CREATE, 0755) | |
| 249 | 318 | bail(err) | |
| 250 | 319 | ||
| 251 | - | err = ts.Execute(w, data) | |
| 320 | + | err = ts.Execute(w, writeData.Data) | |
| 252 | 321 | bail(err) | |
| 253 | 322 | } | |
| 254 | 323 | ||
| 255 | - | func writeIndex(data *IndexPage) { | |
| 256 | - | files := []string{"./html/index.page.tmpl"} | |
| 257 | - | files = append( | |
| 258 | - | files, | |
| 259 | - | "./html/header.partial.tmpl", | |
| 260 | - | "./html/base.layout.tmpl", | |
| 261 | - | ) | |
| 262 | - | ||
| 263 | - | ts, err := html.ParseFiles(files...) | |
| 264 | - | bail(err) | |
| 265 | - | ||
| 266 | - | outdir := viper.GetString("outdir") | |
| 267 | - | dir := filepath.Join(outdir) | |
| 268 | - | err = os.MkdirAll(dir, os.ModePerm) | |
| 269 | - | bail(err) | |
| 270 | - | ||
| 271 | - | fp := filepath.Join(dir, "index.html") | |
| 272 | - | fmt.Printf("writing (%s)\n", fp) | |
| 273 | - | ||
| 274 | - | w, err := os.OpenFile(fp, os.O_WRONLY|os.O_CREATE, 0755) | |
| 275 | - | bail(err) | |
| 276 | - | ||
| 277 | - | err = ts.Execute(w, data) | |
| 278 | - | bail(err) | |
| 279 | - | } | |
| 280 | - | ||
| 281 | - | func writeRootSummary(data *PageData) { | |
| 282 | - | writeHtml(&WriteData{ | |
| 283 | - | Name: "index.html", | |
| 284 | - | Template: "./html/summary.page.tmpl", | |
| 285 | - | Data: data, | |
| 286 | - | RepoName: data.Repo.Name, | |
| 287 | - | Repo: data.Repo, | |
| 324 | + | func (c *Config) writeRootSummary(data *PageData, readme template.HTML) { | |
| 325 | + | c.writeHtml(&WriteData{ | |
| 326 | + | Filename: "index.html", | |
| 327 | + | Template: "html/summary.page.tmpl", | |
| 328 | + | Data: &SummaryPageData{ | |
| 329 | + | PageData: data, | |
| 330 | + | Readme: readme, | |
| 331 | + | }, | |
| 288 | 332 | }) | |
| 289 | 333 | } | |
| 290 | 334 | ||
| 291 | - | func writeTree(data *PageData) { | |
| 292 | - | writeHtml(&WriteData{ | |
| 293 | - | Name: "index.html", | |
| 294 | - | Subdir: filepath.Join("tree", data.RevName), | |
| 295 | - | Template: "./html/tree.page.tmpl", | |
| 296 | - | Data: data, | |
| 297 | - | RepoName: data.Repo.Name, | |
| 298 | - | Repo: data.Repo, | |
| 335 | + | func (c *Config) writeTree(data *PageData, tree []*TreeItem) { | |
| 336 | + | c.writeHtml(&WriteData{ | |
| 337 | + | Filename: "index.html", | |
| 338 | + | Subdir: filepath.Join("tree", data.RevData.RevName), | |
| 339 | + | Template: "html/tree.page.tmpl", | |
| 340 | + | Data: &TreePageData{ | |
| 341 | + | PageData: data, | |
| 342 | + | Tree: tree, | |
| 343 | + | }, | |
| 299 | 344 | }) | |
| 300 | 345 | } | |
| 301 | - | func writeLog(data *PageData) { | |
| 302 | - | writeHtml(&WriteData{ | |
| 303 | - | Name: "index.html", | |
| 304 | - | Subdir: filepath.Join("logs", data.RevName), | |
| 305 | - | Template: "./html/log.page.tmpl", | |
| 306 | - | Data: data, | |
| 307 | - | RepoName: data.Repo.Name, | |
| 308 | - | Repo: data.Repo, | |
| 346 | + | ||
| 347 | + | func (c *Config) writeLog(data *PageData, logs []*CommitData) { | |
| 348 | + | c.writeHtml(&WriteData{ | |
| 349 | + | Filename: "index.html", | |
| 350 | + | Subdir: filepath.Join("logs", data.RevData.RevName), | |
| 351 | + | Template: "html/log.page.tmpl", | |
| 352 | + | Data: &LogPageData{ | |
| 353 | + | PageData: data, | |
| 354 | + | Logs: logs, | |
| 355 | + | }, | |
| 309 | 356 | }) | |
| 310 | 357 | } | |
| 311 | - | func writeRefs(data *PageData) { | |
| 312 | - | writeHtml(&WriteData{ | |
| 313 | - | Name: "refs.html", | |
| 314 | - | Template: "./html/refs.page.tmpl", | |
| 315 | - | Data: data, | |
| 316 | - | RepoName: data.Repo.Name, | |
| 317 | - | Repo: data.Repo, | |
| 358 | + | ||
| 359 | + | func (c *Config) writeRefs(data *PageData, refs []*RefInfo) { | |
| 360 | + | c.writeHtml(&WriteData{ | |
| 361 | + | Filename: "refs.html", | |
| 362 | + | Template: "html/refs.page.tmpl", | |
| 363 | + | Data: &RefPageData{ | |
| 364 | + | PageData: data, | |
| 365 | + | Refs: refs, | |
| 366 | + | }, | |
| 318 | 367 | }) | |
| 319 | 368 | } | |
| 320 | 369 | ||
| 321 | - | func writeHTMLTreeFiles(data *PageData) string { | |
| 370 | + | func (c *Config) writeHTMLTreeFiles(pageData *PageData, tree []*TreeItem) string { | |
| 322 | 371 | readme := "" | |
| 323 | - | for _, file := range data.Tree { | |
| 372 | + | for _, file := range tree { | |
| 324 | 373 | b, err := file.Entry.Blob().Bytes() | |
| 325 | 374 | bail(err) | |
| 326 | 375 | str := string(b) | |
| 327 | 376 | ||
| 328 | - | file.IsTextFile = shared.IsTextFile(str) | |
| 377 | + | file.IsTextFile = isTextFile(str) | |
| 329 | 378 | ||
| 330 | 379 | contents := "binary file, cannot display" | |
| 331 | 380 | if file.IsTextFile { | |
| 332 | 381 | file.NumLines = len(strings.Split(str, "\n")) | |
| 333 | - | contents, err = pastes.ParseText(file.Entry.Name(), string(b)) | |
| 382 | + | contents, err = parseText(file.Entry.Name(), string(b)) | |
| 334 | 383 | bail(err) | |
| 335 | 384 | } | |
| 336 | 385 | ||
| 337 | 386 | d := filepath.Dir(file.Path) | |
| 338 | 387 | ||
| 339 | 388 | nameLower := strings.ToLower(file.Entry.Name()) | |
| 340 | - | summary := readmeFile(data.Repo) | |
| 389 | + | summary := readmeFile(pageData.Repo) | |
| 341 | 390 | if nameLower == summary { | |
| 342 | 391 | readme = contents | |
| 343 | 392 | } | |
| 344 | 393 | ||
| 345 | - | writeHtml(&WriteData{ | |
| 346 | - | Name: fmt.Sprintf("%s.html", file.Entry.Name()), | |
| 347 | - | Template: "./html/file.page.tmpl", | |
| 348 | - | Data: &FileData{ | |
| 394 | + | c.writeHtml(&WriteData{ | |
| 395 | + | Filename: fmt.Sprintf("%s.html", file.Entry.Name()), | |
| 396 | + | Template: "html/file.page.tmpl", | |
| 397 | + | Data: &FilePageData{ | |
| 398 | + | PageData: pageData, | |
| 349 | 399 | Contents: template.HTML(contents), | |
| 350 | 400 | Path: file.Path, | |
| 351 | 401 | }, | |
| 352 | - | RepoName: data.Repo.Name, | |
| 353 | - | Subdir: filepath.Join("tree", data.RevName, "item", d), | |
| 354 | - | Repo: data.Repo, | |
| 402 | + | Subdir: filepath.Join("tree", pageData.RevData.RevName, "item", d), | |
| 355 | 403 | }) | |
| 356 | 404 | } | |
| 357 | 405 | return readme | |
| 358 | 406 | } | |
| 359 | 407 | ||
| 360 | - | func (c *Config) writeLogDiffs(repo *git.Repository, pageData *PageData) { | |
| 361 | - | project := pageData.Repo.Name | |
| 362 | - | for _, commit := range pageData.Log { | |
| 408 | + | func (c *Config) writeLogDiffs(repo *git.Repository, pageData *PageData, logs []*CommitData) { | |
| 409 | + | for _, commit := range logs { | |
| 363 | 410 | commitID := commit.ID.String() | |
| 364 | 411 | ||
| 365 | 412 | if c.Cache[commitID] { |
| ... | ... | @@ -377,7 +424,7 @@ func (c *Config) writeLogDiffs(repo *git.Repository, pageData *PageData) { | |
| 377 | 424 | pt := ancestors[0] | |
| 378 | 425 | parent = &CommitData{ | |
| 379 | 426 | Commit: pt, | |
| 380 | - | URL: commitURL(project, pt.ID.String()), | |
| 427 | + | URL: c.getCommitURL(pt.ID.String()), | |
| 381 | 428 | } | |
| 382 | 429 | } | |
| 383 | 430 | parentID := parent.ID.String() |
| ... | ... | @@ -413,7 +460,7 @@ func (c *Config) writeLogDiffs(repo *git.Repository, pageData *PageData) { | |
| 413 | 460 | } | |
| 414 | 461 | } | |
| 415 | 462 | // set filename to something our `ParseText` recognizes (e.g. `.diff`) | |
| 416 | - | finContent, err := pastes.ParseText("commit.diff", content) | |
| 463 | + | finContent, err := parseText("commit.diff", content) | |
| 417 | 464 | bail(err) | |
| 418 | 465 | ||
| 419 | 466 | fl.Content = template.HTML(finContent) |
| ... | ... | @@ -422,73 +469,110 @@ func (c *Config) writeLogDiffs(repo *git.Repository, pageData *PageData) { | |
| 422 | 469 | rnd.Files = fls | |
| 423 | 470 | ||
| 424 | 471 | commitData := &CommitPageData{ | |
| 472 | + | PageData: pageData, | |
| 425 | 473 | Commit: commit, | |
| 426 | 474 | CommitID: commit.ID.String()[:7], | |
| 427 | 475 | Diff: rnd, | |
| 428 | - | Repo: pageData.Repo, | |
| 429 | 476 | Parent: parentID[:7], | |
| 430 | - | CommitURL: commitURL(project, commitID), | |
| 431 | - | ParentURL: commitURL(project, parentID), | |
| 477 | + | CommitURL: c.getCommitURL(commitID), | |
| 478 | + | ParentURL: c.getCommitURL(parentID), | |
| 432 | 479 | } | |
| 433 | 480 | ||
| 434 | - | writeHtml(&WriteData{ | |
| 435 | - | Name: fmt.Sprintf("%s.html", commitID), | |
| 436 | - | Template: "./html/commit.page.tmpl", | |
| 437 | - | Data: commitData, | |
| 438 | - | RepoName: pageData.Repo.Name, | |
| 481 | + | c.writeHtml(&WriteData{ | |
| 482 | + | Filename: fmt.Sprintf("%s.html", commitID), | |
| 483 | + | Template: "html/commit.page.tmpl", | |
| 439 | 484 | Subdir: "commits", | |
| 440 | - | Repo: pageData.Repo, | |
| 485 | + | Data: commitData, | |
| 441 | 486 | }) | |
| 442 | 487 | } | |
| 443 | 488 | } | |
| 444 | 489 | ||
| 445 | - | func (c *Config) writeRepo(config *RepoConfig) *BranchOutput { | |
| 446 | - | repo, err := git.Open(config.Path) | |
| 490 | + | type SiteURLs struct { | |
| 491 | + | RootURL template.URL | |
| 492 | + | CloneURL template.URL | |
| 493 | + | SummaryURL template.URL | |
| 494 | + | RefsURL template.URL | |
| 495 | + | } | |
| 496 | + | ||
| 497 | + | func (c *Config) getCloneURL() template.URL { | |
| 498 | + | url := fmt.Sprintf("https://%s/%s.git", c.CloneURL, c.RepoName) | |
| 499 | + | return template.URL(url) | |
| 500 | + | } | |
| 501 | + | ||
| 502 | + | func (c *Config) getSummaryUrl() template.URL { | |
| 503 | + | url := fmt.Sprintf("/%s/index.html", c.RepoName) | |
| 504 | + | return template.URL(url) | |
| 505 | + | } | |
| 506 | + | ||
| 507 | + | func (c *Config) getRefsUrl() template.URL { | |
| 508 | + | url := fmt.Sprintf("/%s/refs.html", c.RepoName) | |
| 509 | + | return template.URL(url) | |
| 510 | + | } | |
| 511 | + | ||
| 512 | + | func (c *Config) getTreeUrl(revn string) template.URL { | |
| 513 | + | url := fmt.Sprintf("/%s/tree/%s/index.html", c.RepoName, revn) | |
| 514 | + | return template.URL(url) | |
| 515 | + | } | |
| 516 | + | ||
| 517 | + | func (c *Config) getLogsUrl(revn string) template.URL { | |
| 518 | + | url := fmt.Sprintf("/%s/logs/%s/index.html", c.RepoName, revn) | |
| 519 | + | return template.URL(url) | |
| 520 | + | } | |
| 521 | + | ||
| 522 | + | func (c *Config) getCommitURL(commitID string) template.URL { | |
| 523 | + | url := fmt.Sprintf("/%s/commits/%s.html", c.RepoName, commitID) | |
| 524 | + | return template.URL(url) | |
| 525 | + | } | |
| 526 | + | ||
| 527 | + | func (c *Config) getURLs() *SiteURLs { | |
| 528 | + | return &SiteURLs{ | |
| 529 | + | RootURL: c.HomeUrl, | |
| 530 | + | CloneURL: c.CloneURL, | |
| 531 | + | RefsURL: c.getRefsUrl(), | |
| 532 | + | SummaryURL: c.getSummaryUrl(), | |
| 533 | + | } | |
| 534 | + | } | |
| 535 | + | ||
| 536 | + | func (c *Config) writeRepo() *BranchOutput { | |
| 537 | + | repo, err := git.Open(c.RepoPath) | |
| 447 | 538 | bail(err) | |
| 448 | 539 | ||
| 449 | - | name := repoName(config.Path) | |
| 540 | + | name := repoName(c.RepoPath) | |
| 450 | 541 | ||
| 451 | 542 | refs, err := repo.ShowRef(git.ShowRefOptions{Heads: true, Tags: true}) | |
| 452 | 543 | bail(err) | |
| 453 | 544 | ||
| 454 | - | rev := findDefaultBranch(config, refs) | |
| 545 | + | rev := c.findDefaultBranch(refs) | |
| 455 | 546 | if rev == nil { | |
| 456 | 547 | bail(fmt.Errorf("no default branch found")) | |
| 457 | 548 | } | |
| 458 | 549 | _, revName := filepath.Split(rev.Refspec) | |
| 459 | 550 | ||
| 460 | 551 | refInfoMap := map[string]*RefInfo{} | |
| 461 | - | var mainOutput *BranchOutput | |
| 552 | + | mainOutput := &BranchOutput{} | |
| 462 | 553 | claimed := false | |
| 463 | - | for _, revn := range config.Refs { | |
| 464 | - | for _, head := range refs { | |
| 465 | - | _, headName := filepath.Split(head.Refspec) | |
| 554 | + | for _, revn := range c.Refs { | |
| 555 | + | for _, ref := range refs { | |
| 556 | + | _, headName := filepath.Split(ref.Refspec) | |
| 466 | 557 | if revn != headName { | |
| 467 | 558 | continue | |
| 468 | 559 | } | |
| 469 | - | refInfoMap[head.ID] = &RefInfo{ | |
| 470 | - | Refspec: strings.TrimPrefix(head.Refspec, "refs/"), | |
| 560 | + | refInfoMap[ref.ID] = &RefInfo{ | |
| 561 | + | Refspec: strings.TrimPrefix(ref.Refspec, "refs/"), | |
| 471 | 562 | URL: template.URL(fmt.Sprintf("/%s/tree/%s/index.html", name, revn)), | |
| 472 | 563 | } | |
| 473 | 564 | ||
| 474 | - | branchRepo := &RepoData{ | |
| 475 | - | Name: name, | |
| 476 | - | Desc: config.Desc, | |
| 477 | - | MaxCommits: config.MaxCommits, | |
| 478 | - | Readme: config.Readme, | |
| 479 | - | HideTreeLastCommit: config.HideTreeLastCommit, | |
| 480 | - | SummaryURL: fmt.Sprintf("/%s/index.html", name), | |
| 481 | - | TreeURL: fmt.Sprintf("/%s/tree/%s/index.html", name, revn), | |
| 482 | - | LogURL: fmt.Sprintf("/%s/logs/%s/index.html", name, revn), | |
| 483 | - | RefsURL: fmt.Sprintf("/%s/refs.html", name), | |
| 484 | - | CloneURL: fmt.Sprintf("https://%s/%s.git", c.URL, name), | |
| 485 | - | RevName: revn, | |
| 565 | + | branchRepo := &RevData{ | |
| 566 | + | TreeURL: c.getTreeUrl(revn), | |
| 567 | + | LogURL: c.getLogsUrl(revn), | |
| 568 | + | RevName: revn, | |
| 569 | + | Ref: ref, | |
| 486 | 570 | } | |
| 487 | 571 | ||
| 488 | 572 | data := &PageData{ | |
| 489 | - | Rev: head, | |
| 490 | - | RevName: headName, | |
| 491 | - | Repo: branchRepo, | |
| 573 | + | Repo: c, | |
| 574 | + | RevData: branchRepo, | |
| 575 | + | SiteURLs: c.getURLs(), | |
| 492 | 576 | } | |
| 493 | 577 | ||
| 494 | 578 | branchOutput := c.writeBranch(repo, data) |
| ... | ... | @@ -524,31 +608,24 @@ func (c *Config) writeRepo(config *RepoConfig) *BranchOutput { | |
| 524 | 608 | return urlI > urlJ | |
| 525 | 609 | }) | |
| 526 | 610 | ||
| 527 | - | repoData := &RepoData{ | |
| 528 | - | Name: name, | |
| 529 | - | Desc: config.Desc, | |
| 530 | - | SummaryURL: fmt.Sprintf("/%s/index.html", name), | |
| 531 | - | TreeURL: fmt.Sprintf("/%s/tree/%s/index.html", name, revName), | |
| 532 | - | LogURL: fmt.Sprintf("/%s/logs/%s/index.html", name, revName), | |
| 533 | - | RefsURL: fmt.Sprintf("/%s/refs.html", name), | |
| 534 | - | CloneURL: fmt.Sprintf("https://%s/%s.git", c.URL, name), | |
| 535 | - | RevName: revName, | |
| 611 | + | revData := &RevData{ | |
| 612 | + | TreeURL: c.getTreeUrl(revName), | |
| 613 | + | LogURL: c.getLogsUrl(revName), | |
| 614 | + | RevName: revName, | |
| 536 | 615 | } | |
| 537 | 616 | ||
| 538 | 617 | data := &PageData{ | |
| 539 | - | Rev: rev, | |
| 540 | - | RevName: revName, | |
| 541 | - | Repo: repoData, | |
| 542 | - | Readme: template.HTML(mainOutput.Readme), | |
| 543 | - | Refs: refInfoList, | |
| 618 | + | RevData: revData, | |
| 619 | + | Repo: c, | |
| 620 | + | SiteURLs: c.getURLs(), | |
| 544 | 621 | } | |
| 545 | - | writeRefs(data) | |
| 546 | - | writeRootSummary(data) | |
| 622 | + | c.writeRefs(data, refInfoList) | |
| 623 | + | c.writeRootSummary(data, template.HTML(mainOutput.Readme)) | |
| 547 | 624 | return mainOutput | |
| 548 | 625 | } | |
| 549 | 626 | ||
| 550 | 627 | func (c *Config) writeBranch(repo *git.Repository, pageData *PageData) *BranchOutput { | |
| 551 | - | fmt.Printf("compiling (%s) branch (%s)\n", pageData.Repo.Name, pageData.Repo.RevName) | |
| 628 | + | fmt.Printf("compiling (%s) branch (%s)\n", c.RepoName, pageData.RevData.RevName) | |
| 552 | 629 | ||
| 553 | 630 | output := &BranchOutput{} | |
| 554 | 631 | pageSize := pageData.Repo.MaxCommits |
| ... | ... | @@ -556,7 +633,7 @@ func (c *Config) writeBranch(repo *git.Repository, pageData *PageData) *BranchOu | |
| 556 | 633 | pageSize = 5000 | |
| 557 | 634 | } | |
| 558 | 635 | ||
| 559 | - | commits, err := repo.CommitsByPage(pageData.Rev.ID, 0, pageSize) | |
| 636 | + | commits, err := repo.CommitsByPage(pageData.RevData.Ref.ID, 0, pageSize) | |
| 560 | 637 | bail(err) | |
| 561 | 638 | ||
| 562 | 639 | logs := []*CommitData{} |
| ... | ... | @@ -566,7 +643,7 @@ func (c *Config) writeBranch(repo *git.Repository, pageData *PageData) *BranchOu | |
| 566 | 643 | } | |
| 567 | 644 | ||
| 568 | 645 | logs = append(logs, &CommitData{ | |
| 569 | - | URL: commitURL(pageData.Repo.Name, commit.ID.String()), | |
| 646 | + | URL: c.getCommitURL(commit.ID.String()), | |
| 570 | 647 | ShortID: commit.ID.String()[:7], | |
| 571 | 648 | SummaryStr: commit.Summary(), | |
| 572 | 649 | AuthorStr: commit.Author.Name, |
| ... | ... | @@ -575,10 +652,11 @@ func (c *Config) writeBranch(repo *git.Repository, pageData *PageData) *BranchOu | |
| 575 | 652 | }) | |
| 576 | 653 | } | |
| 577 | 654 | ||
| 578 | - | tree, err := repo.LsTree(pageData.Rev.ID) | |
| 655 | + | tree, err := repo.LsTree(pageData.RevData.Ref.ID) | |
| 579 | 656 | bail(err) | |
| 657 | + | ||
| 580 | 658 | entries := []*TreeItem{} | |
| 581 | - | treeEntries := walkTree(tree, pageData.RevName, "", entries) | |
| 659 | + | treeEntries := walkTree(tree, pageData.RevData.RevName, "", entries) | |
| 582 | 660 | for _, entry := range treeEntries { | |
| 583 | 661 | entry.Path = strings.TrimPrefix(entry.Path, "/") | |
| 584 | 662 |
| ... | ... | @@ -587,7 +665,7 @@ func (c *Config) writeBranch(repo *git.Repository, pageData *PageData) *BranchOu | |
| 587 | 665 | if pageData.Repo.HideTreeLastCommit { | |
| 588 | 666 | fmt.Println("skipping finding last commit for each file") | |
| 589 | 667 | } else { | |
| 590 | - | lastCommits, err = repo.RevList([]string{pageData.Rev.Refspec}, git.RevListOptions{ | |
| 668 | + | lastCommits, err = repo.RevList([]string{pageData.RevData.Ref.Refspec}, git.RevListOptions{ | |
| 591 | 669 | Path: entry.Path, | |
| 592 | 670 | CommandOptions: git.CommandOptions{Args: []string{"-1"}}, | |
| 593 | 671 | }) |
| ... | ... | @@ -597,69 +675,54 @@ func (c *Config) writeBranch(repo *git.Repository, pageData *PageData) *BranchOu | |
| 597 | 675 | if len(lastCommits) > 0 { | |
| 598 | 676 | lc = lastCommits[0] | |
| 599 | 677 | } | |
| 600 | - | entry.CommitURL = commitURL(pageData.Repo.Name, lc.ID.String()) | |
| 678 | + | entry.CommitURL = c.getCommitURL(lc.ID.String()) | |
| 601 | 679 | entry.Summary = lc.Summary() | |
| 602 | 680 | entry.When = timediff.TimeDiff(lc.Author.When) | |
| 603 | 681 | } | |
| 604 | 682 | entry.URL = filepath.Join( | |
| 605 | 683 | "/", | |
| 606 | - | pageData.Repo.Name, | |
| 684 | + | c.RepoName, | |
| 607 | 685 | "tree", | |
| 608 | - | pageData.RevName, | |
| 686 | + | pageData.RevData.RevName, | |
| 609 | 687 | "item", | |
| 610 | 688 | fmt.Sprintf("%s.html", entry.Path), | |
| 611 | 689 | ) | |
| 612 | 690 | } | |
| 613 | 691 | ||
| 614 | - | pageData.Log = logs | |
| 615 | - | pageData.Tree = treeEntries | |
| 616 | - | ||
| 617 | - | fmt.Printf("compilation complete (%s) branch (%s)", pageData.Repo.Name, pageData.Repo.RevName) | |
| 618 | - | ||
| 619 | - | writeLog(pageData) | |
| 620 | - | readme := writeHTMLTreeFiles(pageData) | |
| 621 | - | c.writeLogDiffs(repo, pageData) | |
| 692 | + | fmt.Printf("compilation complete (%s) branch (%s)\n", c.RepoName, pageData.RevData.RevName) | |
| 622 | 693 | ||
| 623 | - | writeTree(pageData) | |
| 694 | + | c.writeLog(pageData, logs) | |
| 695 | + | c.writeLogDiffs(repo, pageData, logs) | |
| 696 | + | c.writeTree(pageData, treeEntries) | |
| 697 | + | readme := c.writeHTMLTreeFiles(pageData, treeEntries) | |
| 624 | 698 | ||
| 625 | 699 | output.Readme = readme | |
| 626 | 700 | return output | |
| 627 | 701 | } | |
| 628 | 702 | ||
| 629 | 703 | func main() { | |
| 630 | - | viper.SetDefault("outdir", "./public") | |
| 631 | - | viper.SetConfigName("config") | |
| 632 | - | viper.SetConfigType("yaml") | |
| 633 | - | viper.AddConfigPath(".") | |
| 634 | - | err := viper.ReadInConfig() | |
| 635 | - | bail(err) | |
| 636 | - | ||
| 637 | - | var config Config | |
| 638 | - | err = viper.Unmarshal(&config) | |
| 639 | - | bail(err) | |
| 640 | - | ||
| 641 | - | config.Cache = make(map[string]bool) | |
| 642 | - | ||
| 643 | - | repoList := []*RepoItemData{} | |
| 644 | - | for _, r := range config.Repos { | |
| 645 | - | mainOutput := config.writeRepo(r) | |
| 646 | - | name := repoName(r.Path) | |
| 647 | - | url := filepath.Join("/", name, "index.html") | |
| 648 | - | repoList = append(repoList, &RepoItemData{ | |
| 649 | - | URL: url, | |
| 650 | - | Name: name, | |
| 651 | - | Desc: r.Desc, | |
| 652 | - | CommitDate: timediff.TimeDiff(mainOutput.LastCommit.Author.When), | |
| 653 | - | LastCommit: mainOutput.LastCommit, | |
| 654 | - | }) | |
| 704 | + | var outdir = flag.String("out", "./public", "output directory (default: ./public)") | |
| 705 | + | var rpath = flag.String("repo", ".", "path to git repo") | |
| 706 | + | var refs = flag.String("refs", "HEAD", "path to git repo") | |
| 707 | + | ||
| 708 | + | flag.Parse() | |
| 709 | + | ||
| 710 | + | repoPath := *rpath | |
| 711 | + | // outdir | |
| 712 | + | config := &Config{ | |
| 713 | + | Outdir: *outdir, | |
| 714 | + | RepoPath: repoPath, | |
| 715 | + | RepoName: repoName(repoPath), | |
| 716 | + | Cache: make(map[string]bool), | |
| 717 | + | Refs: strings.Split(*refs, ","), | |
| 655 | 718 | } | |
| 656 | - | sort.Slice(repoList, func(i, j int) bool { | |
| 657 | - | first := repoList[i].LastCommit.Author.When | |
| 658 | - | second := repoList[j].LastCommit.Author.When | |
| 659 | - | return first.After(second) | |
| 660 | - | }) | |
| 661 | 719 | ||
| 662 | - | writeIndex(&IndexPage{ | |
| 663 | - | RepoList: repoList, | |
| 664 | - | }) | |
| 720 | + | fmt.Println(config.Outdir) | |
| 721 | + | fmt.Println(config.RepoPath) | |
| 722 | + | fmt.Println(config.RepoName) | |
| 723 | + | fmt.Println(config.Refs) | |
| 724 | + | ||
| 725 | + | config.writeRepo() | |
| 726 | + | url := filepath.Join("/", config.RepoName, "index.html") | |
| 727 | + | fmt.Println(url) | |
| 665 | 728 | } |