Skip to content

Commit 22a3e9e

Browse files
fix: move platform scoped constants
1 parent 0bc18c0 commit 22a3e9e

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

src/segments/argocd.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313

1414
const (
1515
argocdOptsEnv = "ARGOCD_OPTS"
16-
argocdInvalidFlag = "invalid flag"
1716
argocdInvalidYaml = "invalid yaml"
1817
argocdNoCurrent = "no current context"
1918

src/segments/kubectl.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
const (
1313
ParseKubeConfig properties.Property = "parse_kubeconfig"
1414
ContextAliases properties.Property = "context_aliases"
15-
kubectlCacheKey = "kubectl"
1615
)
1716

1817
type Kubectl struct {

src/segments/path_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ import (
1818
const (
1919
homeDir = "/home/someone"
2020
homeDirWindows = "C:\\Users\\someone"
21-
fooBarMan = "\\foo\\bar\\man"
22-
abc = "/abc"
23-
abcd = "/a/b/c/d"
24-
cdefg = "/c/d/e/f/g"
2521
)
2622

2723
func renderTemplateNoTrimSpace(env *mock.Environment, segmentTemplate string, context any) string {

src/segments/path_unix_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ import (
1414
"github.com/stretchr/testify/assert"
1515
)
1616

17+
const (
18+
abc = "/abc"
19+
abcd = "/a/b/c/d"
20+
cdefg = "/c/d/e/f/g"
21+
)
22+
1723
var testParentCases = []testParentCase{
1824
{
1925
Case: "Inside Home folder",

src/segments/path_windows_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ import (
77
"github.com/jandedobbeleer/oh-my-posh/src/shell"
88
)
99

10+
const (
11+
fooBarMan = "\\foo\\bar\\man"
12+
)
13+
1014
var testParentCases = []testParentCase{
1115
{
1216
Case: "Windows Home folder",

src/segments/spotify.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ const (
2727
// AdIcon indicates an advertisement is playing
2828
AdIcon properties.Property = "ad_icon"
2929

30-
playing = "playing"
31-
stopped = "stopped"
32-
paused = "paused"
33-
advertising = "advertising"
30+
playing = "playing"
31+
stopped = "stopped"
32+
paused = "paused"
3433
)
3534

3635
func (s *Spotify) Template() string {

0 commit comments

Comments
 (0)