Skip to content

Commit

Permalink
style: format code with Gofumpt
Browse files Browse the repository at this point in the history
This commit fixes the style issues introduced in e438e9f according to the output
from Gofumpt.

Details: #841
  • Loading branch information
deepsource-autofix[bot] authored and zhangshanwen committed Jan 9, 2025
1 parent eb7035a commit aa05dd2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion media/base/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ func ByteCountSI(b int) string {
func SaleUpDown(width, height int, size *Size) {
if size.Height == 0 && size.Width > 0 {
size.Height = int(float64(size.Width) / float64(width) * float64(height))

} else if size.Height > 0 && size.Width == 0 {
size.Width = int(float64(size.Height) / float64(height) * float64(width))
}
Expand Down
2 changes: 1 addition & 1 deletion media/cropper.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func loadImageCropper(mb *Builder) web.EventFunc {
AutoCropArea(1).
Attr("@update:model-value", "cropLocals.CropOption=JSON.stringify($event)")
if size != nil {
//scale up and down keep width/height ratio
// scale up and down keep width/height ratio
c.AspectRatio(float64(size.Width), float64(size.Height))
}
// Attr("style", "max-width: 800px; max-height: 600px;")
Expand Down
2 changes: 2 additions & 0 deletions media/integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func TestUpload(t *testing.T) {
t.Fatal(err)
}
}

func checkFileExisted(t *testing.T, filename string) {
var (
file os.FileInfo
Expand All @@ -86,6 +87,7 @@ func checkFileExisted(t *testing.T, filename string) {
return
}
}

func checkCropOption(t *testing.T, name string, cropOption *base.CropOption) {
if cropOption == nil {
t.Fatalf("%s cropOption is nil", name)
Expand Down
2 changes: 1 addition & 1 deletion pagebuilder/model_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ func (b *ModelBuilder) renameContainerDialog(ctx *web.EventContext) (r web.Event
msgr = i18n.MustGetModuleMessages(ctx.R, I18nPageBuilderKey, Messages_en_US).(*Messages)
pMsgr = presets.MustGetMessages(ctx.R)
okAction = web.Plaid().
EventFunc(RenameContainerEvent).Query(paramContainerID, paramID).Go()
EventFunc(RenameContainerEvent).Query(paramContainerID, paramID).Go()
portalName = dialogPortalName
)

Expand Down

0 comments on commit aa05dd2

Please sign in to comment.