From be99500cac89f992a3a9700202cbb9844cf52376 Mon Sep 17 00:00:00 2001 From: Alessio Perugini Date: Wed, 12 Jul 2023 13:09:28 +0200 Subject: [PATCH 1/2] add logging flag --- cli.go | 34 ++++++++++++++++++++++++++++++++-- go.mod | 1 + go.sum | 2 ++ 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/cli.go b/cli.go index 18288ef..1d8e3ed 100644 --- a/cli.go +++ b/cli.go @@ -18,11 +18,13 @@ package helper import ( "fmt" + "io" "os" "path/filepath" "github.com/arduino/go-paths-helper" "github.com/spf13/cobra" + "golang.org/x/exp/slog" "gopkg.in/yaml.v3" ) @@ -30,8 +32,12 @@ import ( func RunPlugin(plugin Plugin) { info := plugin.GetPluginInfo() - var portAddress string - var fqbn string + var ( + fqbn string + logLevel string + verbose bool + portAddress string + ) firmwareFlashCmd := &cobra.Command{ Use: "flash", @@ -117,6 +123,28 @@ func RunPlugin(plugin Plugin) { cli := &cobra.Command{ Use: appName, Short: info.Name + " - This is an Arduino Firmware Uploader plugin.", + PersistentPreRun: func(cmd *cobra.Command, args []string) { + t, found := map[string]slog.Level{ + "trace": slog.LevelDebug, + "debug": slog.LevelDebug, + "info": slog.LevelInfo, + "warn": slog.LevelWarn, + "error": slog.LevelError, + "fatal": slog.LevelError, + "panic": slog.LevelError, + }[logLevel] + if !found { + t = slog.LevelError + } + + var w io.Writer + if !verbose { + w = io.Discard + } else { + w = os.Stdout + } + slog.SetDefault(slog.New(slog.NewTextHandler(w, &slog.HandlerOptions{Level: t}))) + }, } cli.AddCommand(firmwareCmd) cli.AddCommand(certCmd) @@ -125,6 +153,8 @@ func RunPlugin(plugin Plugin) { // The fqbn is an optional flag that can be used by the plugin to do specific operations with a board. // With this input we can support a family of boards and not only a single one per plugin cli.PersistentFlags().StringVarP(&fqbn, "fqbn", "b", "", "Fully qualified board name") + cli.PersistentFlags().StringVar(&logLevel, "log-level", "info", "Messages with this level and above will be logged. Valid levels are: trace, debug, info, warn, error, fatal, panic") + cli.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "Print the logs on the standard output.") if err := cli.Execute(); err != nil { fatal(err.Error(), 1) diff --git a/go.mod b/go.mod index b2ec52a..93d88f2 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( github.com/arduino/go-paths-helper v1.9.1 github.com/spf13/cobra v1.7.0 go.bug.st/relaxed-semver v0.11.0 + golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb gopkg.in/yaml.v3 v3.0.1 ) diff --git a/go.sum b/go.sum index 0cf5aa9..45b1d32 100644 --- a/go.sum +++ b/go.sum @@ -19,6 +19,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= go.bug.st/relaxed-semver v0.11.0 h1:ngzpUlBEZ5F9hJnMZP55LIFbgX3bCztBBufMhJViAsY= go.bug.st/relaxed-semver v0.11.0/go.mod h1:rqPEm+790OTQlAdfSJSHWwpKOg3A8UyvAWMZxYkQivc= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= From 039d2bce34810cf1674a8576b43eff01c2d9d3a9 Mon Sep 17 00:00:00 2001 From: Alessio Perugini Date: Wed, 12 Jul 2023 14:06:50 +0200 Subject: [PATCH 2/2] generate licenes deps --- .licensed.yml | 5 ++ .../go/golang.org/x/exp/constraints.dep.yml | 63 +++++++++++++++++++ .licenses/go/golang.org/x/exp/slices.dep.yml | 62 ++++++++++++++++++ .licenses/go/golang.org/x/exp/slog.dep.yml | 63 +++++++++++++++++++ .../go/golang.org/x/exp/slog/internal.dep.yml | 62 ++++++++++++++++++ .../x/exp/slog/internal/buffer.dep.yml | 62 ++++++++++++++++++ 6 files changed, 317 insertions(+) create mode 100644 .licenses/go/golang.org/x/exp/constraints.dep.yml create mode 100644 .licenses/go/golang.org/x/exp/slices.dep.yml create mode 100644 .licenses/go/golang.org/x/exp/slog.dep.yml create mode 100644 .licenses/go/golang.org/x/exp/slog/internal.dep.yml create mode 100644 .licenses/go/golang.org/x/exp/slog/internal/buffer.dep.yml diff --git a/.licensed.yml b/.licensed.yml index 1715cd1..aed57b2 100644 --- a/.licensed.yml +++ b/.licensed.yml @@ -5,6 +5,11 @@ sources: reviewed: go: - github.com/arduino/go-paths-helper + - golang.org/x/exp/constraints + - golang.org/x/exp/slices + - golang.org/x/exp/slog + - golang.org/x/exp/slog/internal + - golang.org/x/exp/slog/internal/buffer # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-dependencies/AGPL-3.0/.licensed.yml allowed: diff --git a/.licenses/go/golang.org/x/exp/constraints.dep.yml b/.licenses/go/golang.org/x/exp/constraints.dep.yml new file mode 100644 index 0000000..b555153 --- /dev/null +++ b/.licenses/go/golang.org/x/exp/constraints.dep.yml @@ -0,0 +1,63 @@ +--- +name: golang.org/x/exp/constraints +version: v0.0.0-20230711153332-06a737ee72cb +type: go +summary: Package constraints defines a set of useful constraints to be used with type + parameters. +homepage: https://pkg.go.dev/golang.org/x/exp/constraints +license: other +licenses: +- sources: exp@v0.0.0-20230711153332-06a737ee72cb/LICENSE + text: | + Copyright (c) 2009 The Go Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- sources: exp@v0.0.0-20230711153332-06a737ee72cb/PATENTS + text: | + Additional IP Rights Grant (Patents) + + "This implementation" means the copyrightable works distributed by + Google as part of the Go project. + + Google hereby grants to You a perpetual, worldwide, non-exclusive, + no-charge, royalty-free, irrevocable (except as stated in this section) + patent license to make, have made, use, offer to sell, sell, import, + transfer and otherwise run, modify and propagate the contents of this + implementation of Go, where such license applies only to those patent + claims, both currently owned or controlled by Google and acquired in + the future, licensable by Google that are necessarily infringed by this + implementation of Go. This grant does not include claims that would be + infringed only as a consequence of further modification of this + implementation. If you or your agent or exclusive licensee institute or + order or agree to the institution of patent litigation against any + entity (including a cross-claim or counterclaim in a lawsuit) alleging + that this implementation of Go or any code incorporated within this + implementation of Go constitutes direct or contributory patent + infringement, or inducement of patent infringement, then any patent + rights granted to you under this License for this implementation of Go + shall terminate as of the date such litigation is filed. +notices: [] diff --git a/.licenses/go/golang.org/x/exp/slices.dep.yml b/.licenses/go/golang.org/x/exp/slices.dep.yml new file mode 100644 index 0000000..bf58459 --- /dev/null +++ b/.licenses/go/golang.org/x/exp/slices.dep.yml @@ -0,0 +1,62 @@ +--- +name: golang.org/x/exp/slices +version: v0.0.0-20230711153332-06a737ee72cb +type: go +summary: Package slices defines various functions useful with slices of any type. +homepage: https://pkg.go.dev/golang.org/x/exp/slices +license: other +licenses: +- sources: exp@v0.0.0-20230711153332-06a737ee72cb/LICENSE + text: | + Copyright (c) 2009 The Go Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- sources: exp@v0.0.0-20230711153332-06a737ee72cb/PATENTS + text: | + Additional IP Rights Grant (Patents) + + "This implementation" means the copyrightable works distributed by + Google as part of the Go project. + + Google hereby grants to You a perpetual, worldwide, non-exclusive, + no-charge, royalty-free, irrevocable (except as stated in this section) + patent license to make, have made, use, offer to sell, sell, import, + transfer and otherwise run, modify and propagate the contents of this + implementation of Go, where such license applies only to those patent + claims, both currently owned or controlled by Google and acquired in + the future, licensable by Google that are necessarily infringed by this + implementation of Go. This grant does not include claims that would be + infringed only as a consequence of further modification of this + implementation. If you or your agent or exclusive licensee institute or + order or agree to the institution of patent litigation against any + entity (including a cross-claim or counterclaim in a lawsuit) alleging + that this implementation of Go or any code incorporated within this + implementation of Go constitutes direct or contributory patent + infringement, or inducement of patent infringement, then any patent + rights granted to you under this License for this implementation of Go + shall terminate as of the date such litigation is filed. +notices: [] diff --git a/.licenses/go/golang.org/x/exp/slog.dep.yml b/.licenses/go/golang.org/x/exp/slog.dep.yml new file mode 100644 index 0000000..11bf8cd --- /dev/null +++ b/.licenses/go/golang.org/x/exp/slog.dep.yml @@ -0,0 +1,63 @@ +--- +name: golang.org/x/exp/slog +version: v0.0.0-20230711153332-06a737ee72cb +type: go +summary: Package slog provides structured logging, in which log records include a + message, a severity level, and various other attributes expressed as key-value pairs. +homepage: https://pkg.go.dev/golang.org/x/exp/slog +license: other +licenses: +- sources: exp@v0.0.0-20230711153332-06a737ee72cb/LICENSE + text: | + Copyright (c) 2009 The Go Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- sources: exp@v0.0.0-20230711153332-06a737ee72cb/PATENTS + text: | + Additional IP Rights Grant (Patents) + + "This implementation" means the copyrightable works distributed by + Google as part of the Go project. + + Google hereby grants to You a perpetual, worldwide, non-exclusive, + no-charge, royalty-free, irrevocable (except as stated in this section) + patent license to make, have made, use, offer to sell, sell, import, + transfer and otherwise run, modify and propagate the contents of this + implementation of Go, where such license applies only to those patent + claims, both currently owned or controlled by Google and acquired in + the future, licensable by Google that are necessarily infringed by this + implementation of Go. This grant does not include claims that would be + infringed only as a consequence of further modification of this + implementation. If you or your agent or exclusive licensee institute or + order or agree to the institution of patent litigation against any + entity (including a cross-claim or counterclaim in a lawsuit) alleging + that this implementation of Go or any code incorporated within this + implementation of Go constitutes direct or contributory patent + infringement, or inducement of patent infringement, then any patent + rights granted to you under this License for this implementation of Go + shall terminate as of the date such litigation is filed. +notices: [] diff --git a/.licenses/go/golang.org/x/exp/slog/internal.dep.yml b/.licenses/go/golang.org/x/exp/slog/internal.dep.yml new file mode 100644 index 0000000..ff7bc50 --- /dev/null +++ b/.licenses/go/golang.org/x/exp/slog/internal.dep.yml @@ -0,0 +1,62 @@ +--- +name: golang.org/x/exp/slog/internal +version: v0.0.0-20230711153332-06a737ee72cb +type: go +summary: +homepage: https://pkg.go.dev/golang.org/x/exp/slog/internal +license: other +licenses: +- sources: exp@v0.0.0-20230711153332-06a737ee72cb/LICENSE + text: | + Copyright (c) 2009 The Go Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- sources: exp@v0.0.0-20230711153332-06a737ee72cb/PATENTS + text: | + Additional IP Rights Grant (Patents) + + "This implementation" means the copyrightable works distributed by + Google as part of the Go project. + + Google hereby grants to You a perpetual, worldwide, non-exclusive, + no-charge, royalty-free, irrevocable (except as stated in this section) + patent license to make, have made, use, offer to sell, sell, import, + transfer and otherwise run, modify and propagate the contents of this + implementation of Go, where such license applies only to those patent + claims, both currently owned or controlled by Google and acquired in + the future, licensable by Google that are necessarily infringed by this + implementation of Go. This grant does not include claims that would be + infringed only as a consequence of further modification of this + implementation. If you or your agent or exclusive licensee institute or + order or agree to the institution of patent litigation against any + entity (including a cross-claim or counterclaim in a lawsuit) alleging + that this implementation of Go or any code incorporated within this + implementation of Go constitutes direct or contributory patent + infringement, or inducement of patent infringement, then any patent + rights granted to you under this License for this implementation of Go + shall terminate as of the date such litigation is filed. +notices: [] diff --git a/.licenses/go/golang.org/x/exp/slog/internal/buffer.dep.yml b/.licenses/go/golang.org/x/exp/slog/internal/buffer.dep.yml new file mode 100644 index 0000000..9b6686b --- /dev/null +++ b/.licenses/go/golang.org/x/exp/slog/internal/buffer.dep.yml @@ -0,0 +1,62 @@ +--- +name: golang.org/x/exp/slog/internal/buffer +version: v0.0.0-20230711153332-06a737ee72cb +type: go +summary: Package buffer provides a pool-allocated byte buffer. +homepage: https://pkg.go.dev/golang.org/x/exp/slog/internal/buffer +license: other +licenses: +- sources: exp@v0.0.0-20230711153332-06a737ee72cb/LICENSE + text: | + Copyright (c) 2009 The Go Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- sources: exp@v0.0.0-20230711153332-06a737ee72cb/PATENTS + text: | + Additional IP Rights Grant (Patents) + + "This implementation" means the copyrightable works distributed by + Google as part of the Go project. + + Google hereby grants to You a perpetual, worldwide, non-exclusive, + no-charge, royalty-free, irrevocable (except as stated in this section) + patent license to make, have made, use, offer to sell, sell, import, + transfer and otherwise run, modify and propagate the contents of this + implementation of Go, where such license applies only to those patent + claims, both currently owned or controlled by Google and acquired in + the future, licensable by Google that are necessarily infringed by this + implementation of Go. This grant does not include claims that would be + infringed only as a consequence of further modification of this + implementation. If you or your agent or exclusive licensee institute or + order or agree to the institution of patent litigation against any + entity (including a cross-claim or counterclaim in a lawsuit) alleging + that this implementation of Go or any code incorporated within this + implementation of Go constitutes direct or contributory patent + infringement, or inducement of patent infringement, then any patent + rights granted to you under this License for this implementation of Go + shall terminate as of the date such litigation is filed. +notices: []