1
0
Fork 0
forked from forgejo/forgejo

Go 1.19 format (#20758)

* 1.19 gofumpt

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Change CSV test

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Commit whitespace fixes from @zeripath

Co-authored-by: zeripath <art27@cantab.net>

* Update emoji

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* bump swagger & fix generate-swagger

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
John Olheiser 2022-08-30 21:15:45 -05:00 committed by GitHub
parent 3edc14b687
commit a48d6ba4b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 626 additions and 578 deletions

View file

@ -36,20 +36,20 @@ func drawBlock(img *image.Paletted, x, y, size, angle int, points []int) {
// blank
//
// --------
// | |
// | |
// | |
// --------
// --------
// | |
// | |
// | |
// --------
func b0(img *image.Paletted, x, y, size, angle int) {}
// full-filled
//
// --------
// |######|
// |######|
// |######|
// --------
// --------
// |######|
// |######|
// |######|
// --------
func b1(img *image.Paletted, x, y, size, angle int) {
for i := x; i < x+size; i++ {
for j := y; j < y+size; j++ {
@ -59,12 +59,13 @@ func b1(img *image.Paletted, x, y, size, angle int) {
}
// a small block
// ----------
// | |
// | #### |
// | #### |
// | |
// ----------
//
// ----------
// | |
// | #### |
// | #### |
// | |
// ----------
func b2(img *image.Paletted, x, y, size, angle int) {
l := size / 4
x += l
@ -79,15 +80,15 @@ func b2(img *image.Paletted, x, y, size, angle int) {
// diamond
//
// ---------
// | # |
// | ### |
// | ##### |
// |#######|
// | ##### |
// | ### |
// | # |
// ---------
// ---------
// | # |
// | ### |
// | ##### |
// |#######|
// | ##### |
// | ### |
// | # |
// ---------
func b3(img *image.Paletted, x, y, size, angle int) {
m := size / 2
drawBlock(img, x, y, size, 0, []int{
@ -101,13 +102,13 @@ func b3(img *image.Paletted, x, y, size, angle int) {
// b4
//
// -------
// |#####|
// |#### |
// |### |
// |## |
// |# |
// |------
// -------
// |#####|
// |#### |
// |### |
// |## |
// |# |
// |------
func b4(img *image.Paletted, x, y, size, angle int) {
drawBlock(img, x, y, size, angle, []int{
0, 0,
@ -119,11 +120,11 @@ func b4(img *image.Paletted, x, y, size, angle int) {
// b5
//
// ---------
// | # |
// | ### |
// | ##### |
// |#######|
// ---------
// | # |
// | ### |
// | ##### |
// |#######|
func b5(img *image.Paletted, x, y, size, angle int) {
m := size / 2
drawBlock(img, x, y, size, angle, []int{
@ -136,11 +137,11 @@ func b5(img *image.Paletted, x, y, size, angle int) {
// b6
//
// --------
// |### |
// |### |
// |### |
// --------
// --------
// |### |
// |### |
// |### |
// --------
func b6(img *image.Paletted, x, y, size, angle int) {
m := size / 2
drawBlock(img, x, y, size, angle, []int{
@ -154,12 +155,12 @@ func b6(img *image.Paletted, x, y, size, angle int) {
// b7 italic cone
//
// ---------
// | # |
// | ## |
// | #####|
// | ####|
// |--------
// ---------
// | # |
// | ## |
// | #####|
// | ####|
// |--------
func b7(img *image.Paletted, x, y, size, angle int) {
m := size / 2
drawBlock(img, x, y, size, angle, []int{
@ -173,14 +174,14 @@ func b7(img *image.Paletted, x, y, size, angle int) {
// b8 three small triangles
//
// -----------
// | # |
// | ### |
// | ##### |
// | # # |
// | ### ### |
// |#########|
// -----------
// -----------
// | # |
// | ### |
// | ##### |
// | # # |
// | ### ### |
// |#########|
// -----------
func b8(img *image.Paletted, x, y, size, angle int) {
m := size / 2
mm := m / 2
@ -212,13 +213,13 @@ func b8(img *image.Paletted, x, y, size, angle int) {
// b9 italic triangle
//
// ---------
// |# |
// | #### |
// | #####|
// | #### |
// | # |
// ---------
// ---------
// |# |
// | #### |
// | #####|
// | #### |
// | # |
// ---------
func b9(img *image.Paletted, x, y, size, angle int) {
m := size / 2
drawBlock(img, x, y, size, angle, []int{
@ -231,16 +232,16 @@ func b9(img *image.Paletted, x, y, size, angle int) {
// b10
//
// ----------
// | ####|
// | ### |
// | ## |
// | # |
// |#### |
// |### |
// |## |
// |# |
// ----------
// ----------
// | ####|
// | ### |
// | ## |
// | # |
// |#### |
// |### |
// |## |
// |# |
// ----------
func b10(img *image.Paletted, x, y, size, angle int) {
m := size / 2
drawBlock(img, x, y, size, angle, []int{
@ -260,13 +261,13 @@ func b10(img *image.Paletted, x, y, size, angle int) {
// b11
//
// ----------
// |#### |
// |#### |
// |#### |
// | |
// | |
// ----------
// ----------
// |#### |
// |#### |
// |#### |
// | |
// | |
// ----------
func b11(img *image.Paletted, x, y, size, angle int) {
m := size / 2
drawBlock(img, x, y, size, angle, []int{
@ -280,13 +281,13 @@ func b11(img *image.Paletted, x, y, size, angle int) {
// b12
//
// -----------
// | |
// | |
// |#########|
// | ##### |
// | # |
// -----------
// -----------
// | |
// | |
// |#########|
// | ##### |
// | # |
// -----------
func b12(img *image.Paletted, x, y, size, angle int) {
m := size / 2
drawBlock(img, x, y, size, angle, []int{
@ -299,13 +300,13 @@ func b12(img *image.Paletted, x, y, size, angle int) {
// b13
//
// -----------
// | |
// | |
// | # |
// | ##### |
// |#########|
// -----------
// -----------
// | |
// | |
// | # |
// | ##### |
// |#########|
// -----------
func b13(img *image.Paletted, x, y, size, angle int) {
m := size / 2
drawBlock(img, x, y, size, angle, []int{
@ -318,13 +319,13 @@ func b13(img *image.Paletted, x, y, size, angle int) {
// b14
//
// ---------
// | # |
// | ### |
// |#### |
// | |
// | |
// ---------
// ---------
// | # |
// | ### |
// |#### |
// | |
// | |
// ---------
func b14(img *image.Paletted, x, y, size, angle int) {
m := size / 2
drawBlock(img, x, y, size, angle, []int{
@ -337,13 +338,13 @@ func b14(img *image.Paletted, x, y, size, angle int) {
// b15
//
// ----------
// |##### |
// |### |
// |# |
// | |
// | |
// ----------
// ----------
// |##### |
// |### |
// |# |
// | |
// | |
// ----------
func b15(img *image.Paletted, x, y, size, angle int) {
m := size / 2
drawBlock(img, x, y, size, angle, []int{
@ -356,14 +357,14 @@ func b15(img *image.Paletted, x, y, size, angle int) {
// b16
//
// ---------
// | # |
// | ##### |
// |#######|
// | # |
// | ##### |
// |#######|
// ---------
// ---------
// | # |
// | ##### |
// |#######|
// | # |
// | ##### |
// |#######|
// ---------
func b16(img *image.Paletted, x, y, size, angle int) {
m := size / 2
drawBlock(img, x, y, size, angle, []int{
@ -383,13 +384,13 @@ func b16(img *image.Paletted, x, y, size, angle int) {
// b17
//
// ----------
// |##### |
// |### |
// |# |
// | ##|
// | ##|
// ----------
// ----------
// |##### |
// |### |
// |# |
// | ##|
// | ##|
// ----------
func b17(img *image.Paletted, x, y, size, angle int) {
m := size / 2
@ -412,13 +413,13 @@ func b17(img *image.Paletted, x, y, size, angle int) {
// b18
//
// ----------
// |##### |
// |#### |
// |### |
// |## |
// |# |
// ----------
// ----------
// |##### |
// |#### |
// |### |
// |## |
// |# |
// ----------
func b18(img *image.Paletted, x, y, size, angle int) {
m := size / 2
@ -432,13 +433,13 @@ func b18(img *image.Paletted, x, y, size, angle int) {
// b19
//
// ----------
// |########|
// |### ###|
// |# #|
// |### ###|
// |########|
// ----------
// ----------
// |########|
// |### ###|
// |# #|
// |### ###|
// |########|
// ----------
func b19(img *image.Paletted, x, y, size, angle int) {
m := size / 2
@ -473,13 +474,13 @@ func b19(img *image.Paletted, x, y, size, angle int) {
// b20
//
// ----------
// | ## |
// |### |
// |## |
// |## |
// |# |
// ----------
// ----------
// | ## |
// |### |
// |## |
// |## |
// |# |
// ----------
func b20(img *image.Paletted, x, y, size, angle int) {
m := size / 2
q := size / 4
@ -494,13 +495,13 @@ func b20(img *image.Paletted, x, y, size, angle int) {
// b21
//
// ----------
// | #### |
// |## #####|
// |## ##|
// |## |
// |# |
// ----------
// ----------
// | #### |
// |## #####|
// |## ##|
// |## |
// |# |
// ----------
func b21(img *image.Paletted, x, y, size, angle int) {
m := size / 2
q := size / 4
@ -522,13 +523,13 @@ func b21(img *image.Paletted, x, y, size, angle int) {
// b22
//
// ----------
// | #### |
// |## ### |
// |## ##|
// |## ##|
// |# #|
// ----------
// ----------
// | #### |
// |## ### |
// |## ##|
// |## ##|
// |# #|
// ----------
func b22(img *image.Paletted, x, y, size, angle int) {
m := size / 2
q := size / 4
@ -550,13 +551,13 @@ func b22(img *image.Paletted, x, y, size, angle int) {
// b23
//
// ----------
// | #######|
// |### #|
// |## |
// |## |
// |# |
// ----------
// ----------
// | #######|
// |### #|
// |## |
// |## |
// |# |
// ----------
func b23(img *image.Paletted, x, y, size, angle int) {
m := size / 2
q := size / 4
@ -578,13 +579,13 @@ func b23(img *image.Paletted, x, y, size, angle int) {
// b24
//
// ----------
// | ## ###|
// |### ###|
// |## ## |
// |## ## |
// |# # |
// ----------
// ----------
// | ## ###|
// |### ###|
// |## ## |
// |## ## |
// |# # |
// ----------
func b24(img *image.Paletted, x, y, size, angle int) {
m := size / 2
q := size / 4
@ -606,13 +607,13 @@ func b24(img *image.Paletted, x, y, size, angle int) {
// b25
//
// ----------
// |# #|
// |## ###|
// |## ## |
// |###### |
// |#### |
// ----------
// ----------
// |# #|
// |## ###|
// |## ## |
// |###### |
// |#### |
// ----------
func b25(img *image.Paletted, x, y, size, angle int) {
m := size / 2
q := size / 4
@ -634,13 +635,13 @@ func b25(img *image.Paletted, x, y, size, angle int) {
// b26
//
// ----------
// |# #|
// |### ###|
// | #### |
// |### ###|
// |# #|
// ----------
// ----------
// |# #|
// |### ###|
// | #### |
// |### ###|
// |# #|
// ----------
func b26(img *image.Paletted, x, y, size, angle int) {
m := size / 2
q := size / 4
@ -676,13 +677,13 @@ func b26(img *image.Paletted, x, y, size, angle int) {
// b27
//
// ----------
// |########|
// |## ###|
// |# #|
// |### ##|
// |########|
// ----------
// ----------
// |########|
// |## ###|
// |# #|
// |### ##|
// |########|
// ----------
func b27(img *image.Paletted, x, y, size, angle int) {
m := size / 2
q := size / 4