| // Copyright 2022 The Fuchsia Authors. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // The size_check tool checks if a binary_sizes object exceeds one or more |
| // budgets. |
| package main |
| |
| import ( |
| "log" |
| "os" |
| |
| "github.com/maruel/subcommands" |
| |
| "go.chromium.org/luci/client/versioncli" |
| ) |
| |
| const version = "0.0.1" |
| |
| func getApplication() *subcommands.DefaultApplication { |
| return &subcommands.DefaultApplication{ |
| Name: "size_check", |
| Title: "Tool to check binary size budgets.", |
| Commands: []*subcommands.Command{ |
| cmdBudgets(), |
| versioncli.CmdVersion(version), |
| subcommands.CmdHelp, |
| }, |
| } |
| } |
| |
| func main() { |
| log.SetFlags(log.Lmicroseconds) |
| app := getApplication() |
| os.Exit(subcommands.Run(app, nil)) |
| } |