Skip to content

Commit 585d9e7

Browse files
committed
fix go:format
1 parent 5bb0e96 commit 585d9e7

File tree

7 files changed

+41
-36
lines changed

7 files changed

+41
-36
lines changed

redirect_stderr_unix.go

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
// Log the panic under unix to the log file
1717

18+
//go:build !windows
1819
// +build !windows
1920

2021
package main

redirect_stderr_win.go

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//
55
// https://play.golang.org/p/kLtct7lSUg
66

7+
//go:build windows
78
// +build windows
89

910
package main

systray/systray_fake.go

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// You should have received a copy of the GNU Affero General Public License
1414
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1515

16+
//go:build cli
1617
// +build cli
1718

1819
// Systray_fake gets compiled when the tag 'cli' is present. This is useful to build an agent without trayicon functionalities

updater/updater.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,17 @@ func BinPath(path string) string {
9292
//
9393
// Example:
9494
//
95-
// updater := &selfupdate.Updater{
96-
// CurrentVersion: version,
97-
// ApiURL: "http://updates.yourdomain.com/",
98-
// BinURL: "http://updates.yourdownmain.com/",
99-
// DiffURL: "http://updates.yourdomain.com/",
100-
// Dir: "update/",
101-
// CmdName: "myapp", // app name
102-
// }
103-
// if updater != nil {
104-
// go updater.BackgroundRun()
105-
// }
95+
// updater := &selfupdate.Updater{
96+
// CurrentVersion: version,
97+
// ApiURL: "http://updates.yourdomain.com/",
98+
// BinURL: "http://updates.yourdownmain.com/",
99+
// DiffURL: "http://updates.yourdomain.com/",
100+
// Dir: "update/",
101+
// CmdName: "myapp", // app name
102+
// }
103+
// if updater != nil {
104+
// go updater.BackgroundRun()
105+
// }
106106
type Updater struct {
107107
CurrentVersion string // Currently running version.
108108
APIURL string // Base URL for API requests (json files).

upload/doc.go

+16-16
Original file line numberDiff line numberDiff line change
@@ -20,40 +20,40 @@
2020
//
2121
// Make sure that you have a compiled sketch somewhere on your disk
2222
//
23-
// ```go
24-
// commandline = ``"/usr/bin/avrdude" "-C/usr/bin/avrdude.conf" -v -patmega32u4 -cavr109 -P/dev/ttyACM0 -b57600 -D "-Uflash:w:./sketch.hex:i"``
25-
// err := upload.Serial("/dev/ttyACM0", commandline, upload.Extra{}, nil)
26-
// ```
23+
// ```go
24+
// commandline = ``"/usr/bin/avrdude" "-C/usr/bin/avrdude.conf" -v -patmega32u4 -cavr109 -P/dev/ttyACM0 -b57600 -D "-Uflash:w:./sketch.hex:i"``
25+
// err := upload.Serial("/dev/ttyACM0", commandline, upload.Extra{}, nil)
26+
// ```
2727
//
2828
// note that the commandline contains the path of the sketch (sketch.hex)
2929
//
3030
// **Usage for a network upload**
3131
//
3232
// Make sure that you have a compiled sketch somewhere on your disk
3333
//
34-
// ```go
35-
// err := upload.Network("127.0.10.120", "arduino:avr:yun, "./sketch.hex", "", upload.Auth{}, nil)
36-
// ```
34+
// ```go
35+
// err := upload.Network("127.0.10.120", "arduino:avr:yun, "./sketch.hex", "", upload.Auth{}, nil)
36+
// ```
3737
//
3838
// The commandline can be empty or it can contain instructions (depends on the board)
3939
//
4040
// **Resolving commandlines**
4141
//
4242
// If you happen to have an unresolved commandline (full of {} parameters) you can resolve it
4343
//
44-
// ```go
45-
// t := tools.Tools{}
46-
// commandline = upload.Resolve("/dev/ttyACM0", "arduino:avr:leonardo", "./sketch.hex", commandline, upload.Extra{}, t)
47-
// ```
44+
// ```go
45+
// t := tools.Tools{}
46+
// commandline = upload.Resolve("/dev/ttyACM0", "arduino:avr:leonardo", "./sketch.hex", commandline, upload.Extra{}, t)
47+
// ```
4848
//
4949
// 't' must implement the locater interface (the Tools package does!)
5050
//
5151
// **Logging**
5252
// If you're interested in the output of the commands, you can implement the logger interface. Here's an example:
5353
//
54-
// ```go
55-
// logger := logrus.New()
56-
// logger.Level = logrus.DebugLevel
57-
// upload.Serial("/dev/ttyACM0", commandline, upload.Extra{}, logger)
58-
// ```
54+
// ```go
55+
// logger := logrus.New()
56+
// logger.Level = logrus.DebugLevel
57+
// upload.Serial("/dev/ttyACM0", commandline, upload.Extra{}, logger)
58+
// ```
5959
package upload

v2/pkgs/pkgs.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ type Index struct {
3131
}
3232

3333
// Tool is the go representation of the info about a
34-
//tool contained in a package-index file, stripped from
35-
//every non-used field.
34+
// tool contained in a package-index file, stripped from
35+
// every non-used field.
3636
type Tool struct {
3737
Name string `json:"name"`
3838
Version string `json:"version"`

v2/pkgs/tools.go

+9-7
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,15 @@ import (
3939
// Tools is a client that implements github.com/arduino/arduino-create-agent/gen/tools.Service interface.
4040
// It saves tools in a specified folder with this structure: packager/name/version
4141
// For example:
42-
// folder
43-
// └── arduino
44-
// └── bossac
45-
// ├── 1.6.1-arduino
46-
// │   └── bossac
47-
// └── 1.7.0
48-
// └── bossac
42+
//
43+
// folder
44+
// └── arduino
45+
// └── bossac
46+
// ├── 1.6.1-arduino
47+
// │   └── bossac
48+
// └── 1.7.0
49+
// └── bossac
50+
//
4951
// It requires an Indexes client to list and read package index files: use the Indexes struct
5052
type Tools struct {
5153
Indexes interface {

0 commit comments

Comments
 (0)