Skip to content

Commit

Permalink
Don't use log if we don't need to
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Oct 13, 2018
1 parent c11ce7a commit 1ce8fcc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main

import "errors"
import "fmt"
import "log"

import "github.com/fyne-io/fyne/examples/apps"

Expand All @@ -24,6 +23,7 @@ func layoutApp(app fyne.App) {
func formApp(app fyne.App) {
w := app.NewWindow("Form")
largeText := W.NewEntry()
// largeText.Text = "\n\n\n"

form := &W.Form{
OnCancel: func() {
Expand All @@ -47,7 +47,7 @@ func appButton(app fyne.App, label string, onClick func(fyne.App)) *W.Button {
}

func confirmCallback(response bool) {
log.Println("Responded with", response)
fmt.Println("Responded with", response)
}

func main() {
Expand All @@ -56,12 +56,12 @@ func main() {
w := app.NewWindow("Examples")
w.SetContent(&W.Box{Children: []fyne.CanvasObject{
&W.Toolbar{Items: []W.ToolbarItem{
&W.ToolbarAction{Icon: theme.MailComposeIcon(), OnActivated: func() { log.Println("New") }},
&W.ToolbarAction{Icon: theme.MailComposeIcon(), OnActivated: func() { fmt.Println("New") }},
&W.ToolbarSeparator{},
&W.ToolbarSpacer{},
&W.ToolbarAction{Icon: theme.CutIcon(), OnActivated: func() { log.Println("Cut") }},
&W.ToolbarAction{Icon: theme.CopyIcon(), OnActivated: func() { log.Println("Copy") }},
&W.ToolbarAction{Icon: theme.PasteIcon(), OnActivated: func() { log.Println("Paste") }},
&W.ToolbarAction{Icon: theme.CutIcon(), OnActivated: func() { fmt.Println("Cut") }},
&W.ToolbarAction{Icon: theme.CopyIcon(), OnActivated: func() { fmt.Println("Copy") }},
&W.ToolbarAction{Icon: theme.PasteIcon(), OnActivated: func() { fmt.Println("Paste") }},
}},
&W.Label{Text: "Fyne Examples!"},

Expand Down

0 comments on commit 1ce8fcc

Please sign in to comment.