Skip to content

Commit 2de58eb

Browse files
committed
Remove dead code
Signed-off-by: David Gageot <david.gageot@docker.com>
1 parent 786c1c5 commit 2de58eb

3 files changed

Lines changed: 20 additions & 51 deletions

File tree

internal/tui/styles/styles.go

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -32,73 +32,65 @@ var (
3232
var (
3333
// Base application style
3434
AppStyle = lipgloss.NewStyle().
35-
Padding(0, 1, 0, 1)
35+
Padding(0, 1, 0, 1)
3636

3737
// Text styles
3838
HighlightStyle = lipgloss.NewStyle().
39-
Bold(true).
40-
Foreground(highlight)
39+
Bold(true).
40+
Foreground(highlight)
4141

4242
MutedStyle = lipgloss.NewStyle().
43-
Foreground(muted)
43+
Foreground(muted)
4444

4545
SubtleStyle = lipgloss.NewStyle().
46-
Foreground(subtle)
46+
Foreground(subtle)
4747

4848
SecondaryStyle = lipgloss.NewStyle().
49-
Foreground(secondary)
49+
Foreground(secondary)
5050

5151
// Status styles
5252
SuccessStyle = lipgloss.NewStyle().
53-
Foreground(success)
53+
Foreground(success)
5454

5555
ErrorStyle = lipgloss.NewStyle().
56-
Foreground(errorColor)
56+
Foreground(errorColor)
5757

5858
WarningStyle = lipgloss.NewStyle().
59-
Foreground(warning)
59+
Foreground(warning)
6060

6161
ActiveStyle = lipgloss.NewStyle().
62-
Foreground(active)
62+
Foreground(active)
6363

6464
InProgressStyle = lipgloss.NewStyle().
65-
Foreground(inProgress)
65+
Foreground(inProgress)
6666

6767
PendingStyle = lipgloss.NewStyle().
68-
Foreground(pending)
68+
Foreground(pending)
6969

7070
// Layout styles
7171
HeaderStyle = lipgloss.NewStyle().
72-
Bold(true).
73-
Foreground(highlight).
74-
Padding(0, 0, 1, 0)
72+
Bold(true).
73+
Foreground(highlight).
74+
Padding(0, 0, 1, 0)
7575

7676
BaseStyle = lipgloss.NewStyle()
7777

7878
BorderStyle = lipgloss.NewStyle().
79-
Border(lipgloss.RoundedBorder()).
80-
BorderForeground(borderPrimary)
81-
82-
ToolsStyle = lipgloss.NewStyle().
83-
Border(lipgloss.RoundedBorder()).
84-
BorderForeground(borderPrimary).
85-
PaddingLeft(0).
86-
MarginLeft(0).
87-
Align(lipgloss.Left)
79+
Border(lipgloss.RoundedBorder()).
80+
BorderForeground(borderPrimary)
8881

8982
// Input styles
9083
InputStyle = lipgloss.NewStyle().
91-
Padding(2, 0, 1, 0)
84+
Padding(2, 0, 1, 0)
9285

9386
FocusedStyle = lipgloss.NewStyle().
94-
Padding(2, 0, 1, 0)
87+
Padding(2, 0, 1, 0)
9588

9689
// Layout helpers
9790
CenterStyle = lipgloss.NewStyle().
98-
Align(lipgloss.Center, lipgloss.Center)
91+
Align(lipgloss.Center, lipgloss.Center)
9992

10093
// Deprecated styles (kept for backward compatibility)
101-
FooterStyle = BaseStyle
10294
StatusStyle = MutedStyle
10395
ActionStyle = SecondaryStyle
10496
ChatStyle = BaseStyle

pkg/desktop/login.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package desktop
33
import (
44
"context"
55
"os"
6-
"sync"
76
)
87

98
type DockerHubInfo struct {
@@ -12,15 +11,6 @@ type DockerHubInfo struct {
1211
PlanName string `json:"planName"`
1312
}
1413

15-
var (
16-
loginInfoCache DockerHubInfo
17-
loginInfoCacheOnce sync.Once
18-
)
19-
20-
func IsLoggedIn(ctx context.Context) bool {
21-
return GetToken(ctx) != ""
22-
}
23-
2414
func GetToken(ctx context.Context) string {
2515
// Allow the user to override the token via an environment variable.
2616
// This is e.g useful when talking to a gateway on staging.
@@ -33,15 +23,3 @@ func GetToken(ctx context.Context) string {
3323
_ = ClientBackend.Get(ctx, "/registry/token", &token)
3424
return token
3525
}
36-
37-
func GetLoginInfo(ctx context.Context) DockerHubInfo {
38-
loginInfoCacheOnce.Do(func() {
39-
var info DockerHubInfo
40-
if err := ClientBackend.Get(ctx, "/registry/info", &info); err != nil {
41-
info = DockerHubInfo{}
42-
}
43-
44-
loginInfoCache = info
45-
})
46-
return loginInfoCache
47-
}

pkg/servicecore/store.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ import (
4848
)
4949

5050
var (
51-
ErrClientNotFound = errors.New("client not found")
5251
ErrSessionNotFound = errors.New("session not found")
5352
ErrEmptyClientID = errors.New("client ID cannot be empty")
5453
ErrEmptySessionID = errors.New("session ID cannot be empty")

0 commit comments

Comments
 (0)