Skip to content

Commit

Permalink
Allow importing log package (#727)
Browse files Browse the repository at this point in the history
UDENG-5773
  • Loading branch information
adombeck authored Jan 14, 2025
2 parents 775ffcb + fc21d45 commit c636df9
Show file tree
Hide file tree
Showing 46 changed files with 44 additions and 44 deletions.
2 changes: 1 addition & 1 deletion cmd/authd/daemon/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/ubuntu/authd/internal/consts"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/decorate"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/authd/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"github.com/spf13/viper"
"github.com/ubuntu/authd/internal/consts"
"github.com/ubuntu/authd/internal/daemon"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/services"
"github.com/ubuntu/authd/internal/users"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/decorate"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/authd/daemon/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"

"github.com/ubuntu/authd/internal/fileutils"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/log"
)

func migrateOldCacheDir(oldPath, newPath string) error {
Expand Down
2 changes: 1 addition & 1 deletion cmd/authd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"syscall"

"github.com/ubuntu/authd/cmd/authd/daemon"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/log"
)

//FIXME go:generate go run ../generate_completion_documentation.go completion ../../generated
Expand Down
2 changes: 1 addition & 1 deletion examplebroker/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/ubuntu/authd/internal/brokers/auth"
"github.com/ubuntu/authd/internal/brokers/layouts"
"github.com/ubuntu/authd/internal/brokers/layouts/entries"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/log"
"golang.org/x/exp/slices"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/brokers/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/godbus/dbus/v5"
"github.com/ubuntu/authd/internal/brokers/auth"
"github.com/ubuntu/authd/internal/brokers/layouts"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/users"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/decorate"
"golang.org/x/exp/slices"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/brokers/dbusbroker.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"fmt"

"github.com/godbus/dbus/v5"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/services/errmessages"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/decorate"
"gopkg.in/ini.v1"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/brokers/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"sync"

"github.com/godbus/dbus/v5"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/decorate"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/brokers/withexamples.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"os"

"github.com/ubuntu/authd/examplebroker"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/testutils"
"github.com/ubuntu/authd/log"
)

// useExampleBrokers starts a mock system bus and exports the examplebroker in it.
Expand Down
2 changes: 1 addition & 1 deletion internal/consts/consts.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Package consts defines the constants used by the project
package consts

import log "github.com/ubuntu/authd/internal/log"
import log "github.com/ubuntu/authd/log"

var (
// Version is the version of the executable.
Expand Down
2 changes: 1 addition & 1 deletion internal/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/coreos/go-systemd/v22/activation"
"github.com/coreos/go-systemd/v22/daemon"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/decorate"
"google.golang.org/grpc"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/grpcutils/grpcutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

"github.com/ubuntu/authd/internal/consts"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/log"
"google.golang.org/grpc"
healthgrpc "google.golang.org/grpc/health/grpc_health_v1"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/services/errmessages/redactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"errors"
"fmt"

"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/log"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down
2 changes: 1 addition & 1 deletion internal/services/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (

"github.com/ubuntu/authd/internal/brokers"
"github.com/ubuntu/authd/internal/consts"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/proto/authd"
"github.com/ubuntu/authd/internal/services/errmessages"
"github.com/ubuntu/authd/internal/services/nss"
"github.com/ubuntu/authd/internal/services/pam"
"github.com/ubuntu/authd/internal/services/permissions"
"github.com/ubuntu/authd/internal/users"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/decorate"
"google.golang.org/grpc"
"google.golang.org/grpc/health"
Expand Down
2 changes: 1 addition & 1 deletion internal/services/nss/nss.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"math"

"github.com/ubuntu/authd/internal/brokers"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/proto/authd"
"github.com/ubuntu/authd/internal/services/permissions"
"github.com/ubuntu/authd/internal/users"
"github.com/ubuntu/authd/log"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/services/pam/pam.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"github.com/ubuntu/authd/internal/brokers"
"github.com/ubuntu/authd/internal/brokers/auth"
"github.com/ubuntu/authd/internal/brokers/layouts"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/proto/authd"
"github.com/ubuntu/authd/internal/services/permissions"
"github.com/ubuntu/authd/internal/users"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/decorate"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down
2 changes: 1 addition & 1 deletion internal/users/cache/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"slices"
"strconv"

"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/decorate"
"go.etcd.io/bbolt"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/users/cache/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strconv"
"time"

"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/log"
"go.etcd.io/bbolt"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/users/localgroups/localgroups.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"strings"
"sync"

"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/sliceutils"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/decorate"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/users/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"strings"
"syscall"

"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/users/cache"
"github.com/ubuntu/authd/internal/users/localgroups"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/decorate"
)

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/log/log_test.go → log/log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"

"github.com/stretchr/testify/require"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/log"
)

var supportedLevels = []log.Level{
Expand Down
2 changes: 1 addition & 1 deletion pam/integration-tests/cmd/exec-client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

"github.com/godbus/dbus/v5"
"github.com/msteinert/pam/v2"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/authd/pam/internal/dbusmodule"
"github.com/ubuntu/authd/pam/internal/pam_test"
)
Expand Down
2 changes: 1 addition & 1 deletion pam/integration-tests/gdm-module-handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"github.com/msteinert/pam/v2"
"github.com/stretchr/testify/require"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/proto/authd"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/authd/pam/internal/gdm"
"github.com/ubuntu/authd/pam/internal/gdm_test"
"github.com/ubuntu/authd/pam/internal/proto"
Expand Down
2 changes: 1 addition & 1 deletion pam/internal/adapter/authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"github.com/msteinert/pam/v2"
"github.com/ubuntu/authd/internal/brokers/auth"
"github.com/ubuntu/authd/internal/brokers/layouts"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/proto/authd"
"github.com/ubuntu/authd/log"
pam_proto "github.com/ubuntu/authd/pam/internal/proto"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down
2 changes: 1 addition & 1 deletion pam/internal/adapter/authmodeselection.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/msteinert/pam/v2"
"github.com/ubuntu/authd/internal/brokers/layouts"
"github.com/ubuntu/authd/internal/brokers/layouts/entries"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/proto/authd"
"github.com/ubuntu/authd/log"
)

// authModeSelectionModel is the model list to select supported authentication modes.
Expand Down
2 changes: 1 addition & 1 deletion pam/internal/adapter/brokerselection.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/msteinert/pam/v2"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/proto/authd"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/authd/pam/internal/proto"
)

Expand Down
2 changes: 1 addition & 1 deletion pam/internal/adapter/button.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/log"
)

// reselectionWaitTime is the amount of time that we wait before emitting buttonSelected event.
Expand Down
2 changes: 1 addition & 1 deletion pam/internal/adapter/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
tea "github.com/charmbracelet/bubbletea"
"github.com/msteinert/pam/v2"
"github.com/ubuntu/authd/internal/brokers"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/proto/authd"
"github.com/ubuntu/authd/log"
)

// sendEvent sends an event msg to the main event loop.
Expand Down
2 changes: 1 addition & 1 deletion pam/internal/adapter/formmodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/charmbracelet/lipgloss"
"github.com/ubuntu/authd/internal/brokers/layouts"
"github.com/ubuntu/authd/internal/brokers/layouts/entries"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/proto/authd"
"github.com/ubuntu/authd/log"
)

// formModel is the form layout type to allow authentication and return a challenge.
Expand Down
2 changes: 1 addition & 1 deletion pam/internal/adapter/gdmmodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
tea "github.com/charmbracelet/bubbletea"
"github.com/msteinert/pam/v2"
"github.com/ubuntu/authd/internal/brokers/auth"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/proto/authd"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/authd/pam/internal/gdm"
"github.com/ubuntu/authd/pam/internal/proto"
)
Expand Down
2 changes: 1 addition & 1 deletion pam/internal/adapter/gdmmodel_convhandler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"time"

"github.com/msteinert/pam/v2"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/proto/authd"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/authd/pam/internal/gdm"
"github.com/ubuntu/authd/pam/internal/proto"
pam_proto "github.com/ubuntu/authd/pam/internal/proto"
Expand Down
2 changes: 1 addition & 1 deletion pam/internal/adapter/gdmmodel_uimodel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

tea "github.com/charmbracelet/bubbletea"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/proto/authd"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/authd/pam/internal/gdm"
"github.com/ubuntu/authd/pam/internal/gdm_test"
"github.com/ubuntu/authd/pam/internal/proto"
Expand Down
2 changes: 1 addition & 1 deletion pam/internal/adapter/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
tea "github.com/charmbracelet/bubbletea"
"github.com/msteinert/pam/v2"
"github.com/ubuntu/authd/internal/consts"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/proto/authd"
"github.com/ubuntu/authd/log"
pam_proto "github.com/ubuntu/authd/pam/internal/proto"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
Expand Down
2 changes: 1 addition & 1 deletion pam/internal/adapter/nativemodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"github.com/ubuntu/authd/internal/brokers/auth"
"github.com/ubuntu/authd/internal/brokers/layouts"
"github.com/ubuntu/authd/internal/brokers/layouts/entries"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/proto/authd"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/authd/pam/internal/proto"
pam_proto "github.com/ubuntu/authd/pam/internal/proto"
"golang.org/x/term"
Expand Down
2 changes: 1 addition & 1 deletion pam/internal/adapter/newpasswordmodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/charmbracelet/lipgloss"
"github.com/ubuntu/authd/internal/brokers/layouts"
"github.com/ubuntu/authd/internal/brokers/layouts/entries"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/proto/authd"
"github.com/ubuntu/authd/log"
)

// newPasswordModel is the form layout type to allow authentication and return a challenge.
Expand Down
2 changes: 1 addition & 1 deletion pam/internal/adapter/qrcodemodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/muesli/termenv"
"github.com/skip2/go-qrcode"
"github.com/ubuntu/authd/internal/brokers/layouts"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/proto/authd"
"github.com/ubuntu/authd/log"
)

var centeredStyle = lipgloss.NewStyle().Align(lipgloss.Center, lipgloss.Top)
Expand Down
2 changes: 1 addition & 1 deletion pam/internal/adapter/reselectbuttonmodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

tea "github.com/charmbracelet/bubbletea"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/log"
)

type authReselectButtonModel struct {
Expand Down
2 changes: 1 addition & 1 deletion pam/internal/adapter/userselection.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/charmbracelet/bubbles/textinput"
tea "github.com/charmbracelet/bubbletea"
"github.com/msteinert/pam/v2"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/authd/pam/internal/proto"
)

Expand Down
2 changes: 1 addition & 1 deletion pam/internal/dbusmodule/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/godbus/dbus/v5"
"github.com/msteinert/pam/v2"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/decorate"
)

Expand Down
2 changes: 1 addition & 1 deletion pam/internal/dbusmodule/transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/godbus/dbus/v5"
"github.com/msteinert/pam/v2"
"github.com/stretchr/testify/require"
"github.com/ubuntu/authd/internal/log"
"github.com/ubuntu/authd/internal/testutils"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/authd/pam/internal/dbusmodule"
)

Expand Down
Loading

0 comments on commit c636df9

Please sign in to comment.