forked from kptdev/kpt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
43 lines (40 loc) · 2.2 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:generate $GOBIN/mdtogo site/content/en/reference/live internal/docs/generated/livedocs --license=none --recursive=true --strategy=cmdDocs
//go:generate $GOBIN/mdtogo site/content/en/reference/pkg internal/docs/generated/pkgdocs --license=none --recursive=true --strategy=cmdDocs
//go:generate $GOBIN/mdtogo site/content/en/reference/cfg internal/docs/generated/cfgdocs --license=none --recursive=true --strategy=cmdDocs
//go:generate $GOBIN/mdtogo site/content/en/reference/fn internal/docs/generated/fndocs --license=none --recursive=true --strategy=cmdDocs
//go:generate $GOBIN/mdtogo site/content/en/reference internal/docs/generated/overview --license=none --strategy=cmdDocs
//go:generate $GOBIN/mdtogo site/content/en/guides/consumer internal/guides/generated/consumer --license=none --recursive=true --strategy=guide
//go:generate $GOBIN/mdtogo site/content/en/guides/ecosystem internal/guides/generated/ecosystem --license=none --recursive=true --strategy=guide
//go:generate $GOBIN/mdtogo site/content/en/guides/producer internal/guides/generated/producer --license=none --recursive=true --strategy=guide
package main
import (
"github.com/GoogleContainerTools/kpt/internal/util/cmdutil"
"github.com/GoogleContainerTools/kpt/run"
_ "k8s.io/client-go/plugin/pkg/client/auth"
"k8s.io/kubectl/pkg/util/logs"
"sigs.k8s.io/cli-utils/pkg/errors"
)
func main() {
cmd := run.GetMain()
logs.InitLogs()
defer logs.FlushLogs()
if err := cmd.Execute(); err != nil {
cmdutil.PrintErrorStacktrace(err)
// TODO: find a way to avoid having to provide `kpt live` as a
// parameter here.
errors.CheckErr(cmd.ErrOrStderr(), err, "kpt live")
}
}