Skip to content

Commit

Permalink
chore: Bump github.com/loopholelabs/logging to v0.3.0 (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivanshVij authored Aug 30, 2024
1 parent 882b93b commit 9298e14
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 103 deletions.
24 changes: 6 additions & 18 deletions cmdutils.go
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
/*
Copyright 2022 Loophole Labs
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.
*/
// SPDX-License-Identifier: Apache-2.0

package cmdutils

import (
"fmt"
"strings"

"github.com/spf13/cobra"

"github.com/loopholelabs/logging/types"

"github.com/loopholelabs/cmdutils/pkg/config"
"github.com/loopholelabs/cmdutils/pkg/printer"
"github.com/loopholelabs/logging/types"
"github.com/spf13/cobra"
)

// Helper is passed to every single command and is used by individual
Expand All @@ -36,7 +24,7 @@ type Helper[T config.Config] struct {
Printer *printer.Printer

// Logger is used to provide structured logging for a command.
Logger types.Logger
Logger types.RootLogger

// debug defines the debug mode
debug *bool
Expand Down
16 changes: 1 addition & 15 deletions errors.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
/*
Copyright 2022 Loophole Labs
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.
*/
// SPDX-License-Identifier: Apache-2.0

package cmdutils

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/briandowns/spinner v1.23.1
github.com/fatih/color v1.17.0
github.com/jedib0t/go-pretty/v6 v6.5.9
github.com/loopholelabs/logging v0.2.5
github.com/loopholelabs/logging v0.3.0
github.com/mattn/go-isatty v0.0.20
github.com/mitchellh/mapstructure v1.5.0
github.com/spf13/cobra v1.8.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/loopholelabs/logging v0.2.5 h1:6SK/bPbyZ5RKZ8ybYY3RbaxpUh0XN3+2VL9tpHHiL+g=
github.com/loopholelabs/logging v0.2.5/go.mod h1:uRDUydiqPqKbZkb0WoQ3dfyAcJ2iOMhxdEafZssLVv0=
github.com/loopholelabs/logging v0.3.0 h1:Rfo9fGdBk4nwbNdiLrVUF7JkYoC67dvGDodkRe81xF0=
github.com/loopholelabs/logging v0.3.0/go.mod h1:uRDUydiqPqKbZkb0WoQ3dfyAcJ2iOMhxdEafZssLVv0=
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
Expand Down
30 changes: 9 additions & 21 deletions pkg/command/command.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
/*
Copyright 2023 Loophole Labs
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.
*/
// SPDX-License-Identifier: Apache-2.0

package command

Expand All @@ -29,16 +15,18 @@ import (
"sync"

"github.com/fatih/color"
"github.com/loopholelabs/cmdutils"
"github.com/loopholelabs/cmdutils/pkg/config"
"github.com/loopholelabs/cmdutils/pkg/printer"
"github.com/loopholelabs/cmdutils/pkg/version"
"github.com/loopholelabs/logging"
"github.com/loopholelabs/logging/types"
"github.com/mitchellh/mapstructure"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/spf13/viper"

"github.com/loopholelabs/logging"
"github.com/loopholelabs/logging/types"

"github.com/loopholelabs/cmdutils"
"github.com/loopholelabs/cmdutils/pkg/config"
"github.com/loopholelabs/cmdutils/pkg/printer"
"github.com/loopholelabs/cmdutils/pkg/version"
)

type Type int
Expand Down
16 changes: 1 addition & 15 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
/*
Copyright 2023 Loophole Labs
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.
*/
// SPDX-License-Identifier: Apache-2.0

package config

Expand Down
16 changes: 1 addition & 15 deletions pkg/printer/printer.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
/*
Copyright 2022 Loophole Labs
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.
*/
// SPDX-License-Identifier: Apache-2.0

package printer

Expand Down
20 changes: 4 additions & 16 deletions pkg/version/version.go
Original file line number Diff line number Diff line change
@@ -1,27 +1,15 @@
/*
Copyright 2023 Loophole Labs
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.
*/
// SPDX-License-Identifier: Apache-2.0

package version

import (
"fmt"

"github.com/spf13/cobra"

"github.com/loopholelabs/cmdutils"
"github.com/loopholelabs/cmdutils/pkg/config"
"github.com/loopholelabs/cmdutils/pkg/printer"
"github.com/spf13/cobra"
)

type Version[T config.Config] struct {
Expand Down

0 comments on commit 9298e14

Please sign in to comment.