go.fuchsia.dev/infra@v0.0.0-20240507153436-9b593402251b/cmd/size_check/main.go (about) 1 // Copyright 2022 The Fuchsia Authors. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // The size_check tool checks if a binary_sizes object exceeds one or more 6 // budgets. 7 package main 8 9 import ( 10 "log" 11 "os" 12 13 "github.com/maruel/subcommands" 14 15 "go.chromium.org/luci/client/versioncli" 16 ) 17 18 const version = "0.0.1" 19 20 func getApplication() *subcommands.DefaultApplication { 21 return &subcommands.DefaultApplication{ 22 Name: "size_check", 23 Title: "Tool to check binary size budgets.", 24 Commands: []*subcommands.Command{ 25 cmdBudgets(), 26 versioncli.CmdVersion(version), 27 subcommands.CmdHelp, 28 }, 29 } 30 } 31 32 func main() { 33 log.SetFlags(log.Lmicroseconds) 34 app := getApplication() 35 os.Exit(subcommands.Run(app, nil)) 36 }