Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/go_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
go_tests:
strategy:
matrix:
go-version: [1.18.x, 1.19.x, 1.22.x]
go-version: 1.25.x
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19.x
go-version: 1.25.x

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
Expand Down
5 changes: 2 additions & 3 deletions appengine/endpoints/seed.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,13 @@ func (SeedRequestHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {

jsonResponse, err := json.Marshal(resp)
if err != nil {
es := fmt.Sprintf("json.Marshall(%v): %v", resp, err)
log.Errorf(ctx, es)
log.Errorf(ctx, "json.Marshall(%v): %v", resp, err)
http.Error(w, fmt.Sprintf(errSeedResp, err, models.StatusJSONError), http.StatusInternalServerError)
return
}

if _, err = w.Write(jsonResponse); err != nil {
log.Errorf(ctx, fmt.Sprintf("failed to write response to client: %s", err))
log.Errorf(ctx, "failed to write response to client: %s", err)
return
}

Expand Down
7 changes: 3 additions & 4 deletions appengine/endpoints/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import (

var (
c = cache.New(5*time.Minute, 90*time.Minute)
macRegEx = "([^0-9,a-f,A-F,:])"
macRegEx = "([^0-9,a-f,A-F,:])"
bucketFileFinder = bucketFileHandle
)

Expand All @@ -65,14 +65,13 @@ func (SignRequestHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {

jsonResponse, err := json.Marshal(resp)
if err != nil {
es := fmt.Sprintf("json.Marshall(%#v): %v", resp, err)
log.Errorf(ctx, es)
log.Errorf(ctx, "json.Marshall(%#v): %v", resp, err)
http.Error(w, fmt.Sprintf(errResp, err, models.StatusJSONError), http.StatusInternalServerError)
return
}

if _, err = w.Write(jsonResponse); err != nil {
log.Errorf(ctx, fmt.Sprintf("failed to write response to client: %s", err))
log.Errorf(ctx, "failed to write response to client: %s", err)
return
}
log.Infof(ctx, "successfully returned response %#v to client", resp)
Expand Down
25 changes: 10 additions & 15 deletions cli/console/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ import (
"time"

"github.com/docker/go-units"
"github.com/dustin/go-humanize"
"github.com/olekukonko/tablewriter"
"github.com/olekukonko/tablewriter/tw"
"github.com/dustin/go-humanize"
)

var (
Expand All @@ -41,15 +42,15 @@ var (

// Print displays a console message when Verbose is false. Arguments
// are handled in the same manner as fmt.Print.
func Print(v ...interface{}) {
func Print(v ...any) {
if !Verbose {
fmt.Print(v...)
}
}

// Printf displays a console message when Verbose is false. Arguments
// are handled in the same manner as fmt.Printf.
func Printf(format string, v ...interface{}) {
func Printf(format string, v ...any) {
if !Verbose {
fmt.Printf(format+"\n", v...)
}
Expand Down Expand Up @@ -99,28 +100,22 @@ func PrintDevices(targets []TargetDevice, w io.Writer, json bool) {
return
}

//Check if any devices exist.
// Check if any devices exist.
if len(targets) == 0 {
fmt.Fprintf(w, "No matching devices were found.")
return
}

// Display the table to the user otherwise, output devices with table
table := tablewriter.NewWriter(w)
table.SetBorder(false)
table.SetAutoWrapText(false)
table.SetHeader([]string{"Device", "Model", "Size"})
table.SetHeaderColor(
tablewriter.Colors{tablewriter.FgGreenColor}, // Green text for device column.
tablewriter.Colors{}, // No color change for model column.
tablewriter.Colors{}, // No color change for size column.
)
table := tablewriter.NewTable(w,
tablewriter.WithRendition(tw.Rendition{Borders: tw.BorderNone}),
tablewriter.WithRowAutoWrap(tw.WrapNone))
table.Header("\033[32mDevice\033[0m", "Model", "Size")
for _, device := range targets {
table.Append([]string{
table.Append(
device.Identifier(),
device.FriendlyName(),
humanize.Bytes(device.Size()),
},
)
}
table.Render()
Expand Down
108 changes: 73 additions & 35 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,47 +1,85 @@
module github.com/google/fresnel

go 1.18
go 1.25.3

require (
cloud.google.com/go/storage v1.28.1
github.com/docker/go-units v0.4.0
github.com/dustin/go-humanize v1.0.0
github.com/google/deck v0.0.0-20221215182815-59abc1280690
github.com/google/glazier v0.0.0-20220803164842-3bfee96e658a
github.com/google/go-cmp v0.5.9
github.com/google/splice v1.0.0
cloud.google.com/go/storage v1.62.1
github.com/docker/go-units v0.5.0
github.com/dustin/go-humanize v1.0.1
github.com/google/deck v1.1.0
github.com/google/glazier v0.0.0-20260415193324-43fb0ae8570f
github.com/google/go-cmp v0.7.0
github.com/google/splice v1.2.1
github.com/google/subcommands v1.2.0
github.com/google/winops v0.0.0-20210803215038-c8511b84de2b
github.com/olekukonko/tablewriter v0.0.5
github.com/google/winops v0.0.0-20260218212338-878c3f651658
github.com/olekukonko/tablewriter v1.1.4
github.com/patrickmn/go-cache v2.1.0+incompatible
golang.org/x/sys v0.13.0
google.golang.org/appengine v1.6.7
golang.org/x/sys v0.43.0
google.golang.org/appengine v1.6.8
gopkg.in/yaml.v2 v2.4.0
)

require (
cloud.google.com/go v0.110.0 // indirect
cloud.google.com/go/compute v1.19.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v0.13.0 // indirect
github.com/go-ole/go-ole v1.2.5 // indirect
cel.dev/expr v0.25.1 // indirect
cloud.google.com/go v0.123.0 // indirect
cloud.google.com/go/auth v0.20.0 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
cloud.google.com/go/compute/metadata v0.9.0 // indirect
cloud.google.com/go/iam v1.9.0 // indirect
cloud.google.com/go/monitoring v1.27.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.32.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.56.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.56.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/clipperhouse/displaywidth v0.11.0 // indirect
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 // indirect
github.com/envoyproxy/go-control-plane/envoy v1.37.0 // indirect
github.com/envoyproxy/protoc-gen-validate v1.3.3 // indirect
github.com/fatih/color v1.19.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-jose/go-jose/v4 v4.1.4 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/goccy/go-json v0.10.6 // indirect
github.com/godbus/dbus v4.1.0+incompatible // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/logger v1.1.1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.7.1 // indirect
github.com/groob/plist v0.0.0-20210519001750-9f754062e6d6 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/scjalliance/comshim v0.0.0-20190308082608-cf06d2532c4e // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.7.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.114.0 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.56.3 // indirect
google.golang.org/protobuf v1.30.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/s2a-go v0.1.9 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.15 // indirect
github.com/googleapis/gax-go/v2 v2.22.0 // indirect
github.com/groob/plist v0.1.1 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.21 // indirect
github.com/mattn/go-runewidth v0.0.23 // indirect
github.com/olekukonko/cat v0.0.0-20250911104152-50322a0618f6 // indirect
github.com/olekukonko/errors v1.3.0 // indirect
github.com/olekukonko/ll v0.1.8 // indirect
github.com/otiai10/copy v1.14.1 // indirect
github.com/otiai10/mint v1.6.3 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
github.com/scjalliance/comshim v0.0.0-20251021001035-b69f3cdad6f3 // indirect
github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.43.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 // indirect
go.opentelemetry.io/otel v1.43.0 // indirect
go.opentelemetry.io/otel/metric v1.43.0 // indirect
go.opentelemetry.io/otel/sdk v1.43.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.43.0 // indirect
go.opentelemetry.io/otel/trace v1.43.0 // indirect
golang.org/x/crypto v0.50.0 // indirect
golang.org/x/net v0.53.0 // indirect
golang.org/x/oauth2 v0.36.0 // indirect
golang.org/x/sync v0.20.0 // indirect
golang.org/x/text v0.36.0 // indirect
golang.org/x/time v0.15.0 // indirect
google.golang.org/api v0.276.0 // indirect
google.golang.org/genproto v0.0.0-20260420184626-e10c466a9529 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260420184626-e10c466a9529 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260420184626-e10c466a9529 // indirect
google.golang.org/grpc v1.80.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect
)
Loading
Loading