mirror of
https://github.com/siderolabs/omni.git
synced 2026-01-22 03:11:07 +01:00
Omni is source-available under BUSL. Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com> Co-Authored-By: Artem Chernyshev <artem.chernyshev@talos-systems.com> Co-Authored-By: Utku Ozdemir <utku.ozdemir@siderolabs.com> Co-Authored-By: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com> Co-Authored-By: Philipp Sauter <philipp.sauter@siderolabs.com> Co-Authored-By: Noel Georgi <git@frezbo.dev> Co-Authored-By: evgeniybryzh <evgeniybryzh@gmail.com> Co-Authored-By: Tim Jones <tim.jones@siderolabs.com> Co-Authored-By: Andrew Rynhard <andrew@rynhard.io> Co-Authored-By: Spencer Smith <spencer.smith@talos-systems.com> Co-Authored-By: Christian Rolland <christian.rolland@siderolabs.com> Co-Authored-By: Gerard de Leeuw <gdeleeuw@leeuwit.nl> Co-Authored-By: Steve Francis <67986293+steverfrancis@users.noreply.github.com> Co-Authored-By: Volodymyr Mazurets <volodymyrmazureets@gmail.com>
34 lines
932 B
Go
34 lines
932 B
Go
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
package pkg_test
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/siderolabs/omni/client/pkg/omnictl"
|
|
"github.com/siderolabs/omni/client/pkg/version"
|
|
)
|
|
|
|
//nolint:wsl,testableexamples
|
|
func Example() {
|
|
// This is an example of building omnictl executable.
|
|
|
|
version.Name = "omni"
|
|
version.SHA = "build SHA" // Optional.
|
|
version.Tag = "v0.29.0" // Optional.
|
|
version.API = 1 // Required: omnictl validates that the client has the same API version as the server.
|
|
|
|
// You can disable this validation and warnings by setting:
|
|
// version.SuppressVersionWarning = true
|
|
|
|
// Initialize Root cmd version.
|
|
omnictl.RootCmd.Version = version.String()
|
|
|
|
// Run Root command.
|
|
if err := omnictl.RootCmd.Execute(); err != nil {
|
|
os.Exit(1)
|
|
}
|
|
}
|