chore(go): rename module

This commit is contained in:
Jan De Dobbeleer 2022-12-28 17:30:48 +01:00 committed by Jan De Dobbeleer
parent 04bfb2eef1
commit 023546fe37
180 changed files with 555 additions and 417 deletions

View file

@ -2,12 +2,13 @@ package cli
import ( import (
"fmt" "fmt"
"oh-my-posh/platform"
"os" "os"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View file

@ -2,11 +2,12 @@ package cli
import ( import (
"fmt" "fmt"
"oh-my-posh/engine"
"oh-my-posh/platform"
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/jandedobbeleer/oh-my-posh/engine"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View file

@ -2,11 +2,12 @@ package cli
import ( import (
"fmt" "fmt"
"oh-my-posh/color"
"oh-my-posh/console" "github.com/jandedobbeleer/oh-my-posh/color"
"oh-my-posh/engine" "github.com/jandedobbeleer/oh-my-posh/console"
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/engine"
"oh-my-posh/shell" "github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/shell"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View file

@ -2,8 +2,9 @@ package cli
import ( import (
"fmt" "fmt"
"oh-my-posh/engine"
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/engine"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View file

@ -2,13 +2,14 @@ package cli
import ( import (
"fmt" "fmt"
"oh-my-posh/color"
"oh-my-posh/console"
"oh-my-posh/engine"
"oh-my-posh/platform"
"oh-my-posh/shell"
"time" "time"
"github.com/jandedobbeleer/oh-my-posh/color"
"github.com/jandedobbeleer/oh-my-posh/console"
"github.com/jandedobbeleer/oh-my-posh/engine"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/shell"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View file

@ -2,8 +2,9 @@ package cli
import ( import (
"fmt" "fmt"
"oh-my-posh/font"
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/font"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View file

@ -2,11 +2,12 @@ package cli
import ( import (
"fmt" "fmt"
"oh-my-posh/color"
"oh-my-posh/platform"
"strings" "strings"
"time" "time"
"github.com/jandedobbeleer/oh-my-posh/color"
"github.com/jandedobbeleer/oh-my-posh/platform"
color2 "github.com/gookit/color" color2 "github.com/gookit/color"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View file

@ -2,9 +2,10 @@ package cli
import ( import (
"fmt" "fmt"
"oh-my-posh/engine"
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/engine"
"oh-my-posh/shell" "github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/shell"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View file

@ -2,8 +2,9 @@ package cli
import ( import (
"fmt" "fmt"
"oh-my-posh/engine"
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/engine"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View file

@ -1,9 +1,10 @@
package cli package cli
import ( import (
"oh-my-posh/platform"
"strings" "strings"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View file

@ -2,9 +2,10 @@ package color
import ( import (
"fmt" "fmt"
"oh-my-posh/regex"
"oh-my-posh/shell"
"strings" "strings"
"github.com/jandedobbeleer/oh-my-posh/regex"
"github.com/jandedobbeleer/oh-my-posh/shell"
) )
const ( const (

View file

@ -1,9 +1,10 @@
package color package color
import ( import (
"oh-my-posh/shell"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/shell"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -2,10 +2,11 @@ package color
import ( import (
"fmt" "fmt"
"oh-my-posh/platform"
"strconv" "strconv"
"strings" "strings"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/gookit/color" "github.com/gookit/color"
) )

View file

@ -2,7 +2,7 @@
package color package color
import "oh-my-posh/platform" import "github.com/jandedobbeleer/oh-my-posh/platform"
func GetAccentColor(env platform.Environment) (*RGB, error) { func GetAccentColor(env platform.Environment) (*RGB, error) {
return nil, &platform.NotImplemented{} return nil, &platform.NotImplemented{}

View file

@ -2,7 +2,8 @@ package color
import ( import (
"errors" "errors"
"oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/gookit/color" "github.com/gookit/color"
) )

View file

@ -1,8 +1,9 @@
package color package color
import ( import (
"oh-my-posh/regex"
"strings" "strings"
"github.com/jandedobbeleer/oh-my-posh/regex"
) )
// PlainWriter writes a plain string // PlainWriter writes a plain string

View file

@ -1,9 +1,10 @@
package color package color
import ( import (
"oh-my-posh/regex"
"strings" "strings"
"github.com/jandedobbeleer/oh-my-posh/regex"
"github.com/mattn/go-runewidth" "github.com/mattn/go-runewidth"
) )

View file

@ -2,12 +2,13 @@ package color
import ( import (
"fmt" "fmt"
"oh-my-posh/mock"
"oh-my-posh/platform"
"oh-my-posh/shell"
"oh-my-posh/template"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/shell"
"github.com/jandedobbeleer/oh-my-posh/template"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -2,8 +2,9 @@ package color
import ( import (
"fmt" "fmt"
"oh-my-posh/regex"
"strings" "strings"
"github.com/jandedobbeleer/oh-my-posh/regex"
) )
const ( const (

View file

@ -1,9 +1,10 @@
package color package color
import ( import (
"oh-my-posh/shell"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/shell"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -1,9 +1,9 @@
package console package console
import ( import (
"oh-my-posh/color" "github.com/jandedobbeleer/oh-my-posh/color"
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"oh-my-posh/template" "github.com/jandedobbeleer/oh-my-posh/template"
) )
type Title struct { type Title struct {

View file

@ -1,11 +1,12 @@
package console package console
import ( import (
"oh-my-posh/color"
"oh-my-posh/mock"
"oh-my-posh/platform"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/color"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -1,11 +1,12 @@
package engine package engine
import ( import (
"oh-my-posh/color"
"oh-my-posh/platform"
"oh-my-posh/shell"
"sync" "sync"
"time" "time"
"github.com/jandedobbeleer/oh-my-posh/color"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/shell"
) )
// BlockType type of block // BlockType type of block

View file

@ -10,11 +10,11 @@ import (
"strings" "strings"
"time" "time"
"oh-my-posh/color" "github.com/jandedobbeleer/oh-my-posh/color"
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/properties"
"oh-my-posh/segments" "github.com/jandedobbeleer/oh-my-posh/segments"
"oh-my-posh/template" "github.com/jandedobbeleer/oh-my-posh/template"
"github.com/gookit/config/v2" "github.com/gookit/config/v2"
"github.com/gookit/config/v2/json" "github.com/gookit/config/v2/json"

View file

@ -1,12 +1,13 @@
package engine package engine
import ( import (
"oh-my-posh/color"
"oh-my-posh/mock"
"oh-my-posh/platform"
"oh-my-posh/segments"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/color"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/segments"
"github.com/gookit/config/v2" "github.com/gookit/config/v2"
"github.com/mitchellh/mapstructure" "github.com/mitchellh/mapstructure"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"

View file

@ -5,11 +5,11 @@ import (
"strings" "strings"
"time" "time"
"oh-my-posh/color" "github.com/jandedobbeleer/oh-my-posh/color"
"oh-my-posh/console" "github.com/jandedobbeleer/oh-my-posh/console"
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"oh-my-posh/shell" "github.com/jandedobbeleer/oh-my-posh/shell"
"oh-my-posh/template" "github.com/jandedobbeleer/oh-my-posh/template"
) )
type Engine struct { type Engine struct {
@ -305,7 +305,7 @@ func (e *Engine) print() string {
break break
} }
// in bash, the entire rprompt needs to be escaped for the prompt to be interpreted correctly // in bash, the entire rprompt needs to be escaped for the prompt to be interpreted correctly
// see https://github.com/JanDeDobbeleer/oh-my-posh/pull/2398 // see https://github.com/jandedobbeleer/oh-my-posh/pull/2398
ansi := &color.Ansi{} ansi := &color.Ansi{}
ansi.InitPlain() ansi.InitPlain()
prompt := ansi.SaveCursorPosition() prompt := ansi.SaveCursorPosition()

View file

@ -2,13 +2,14 @@ package engine
import ( import (
"errors" "errors"
"oh-my-posh/color"
"oh-my-posh/console"
"oh-my-posh/mock"
"oh-my-posh/platform"
"oh-my-posh/shell"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/color"
"github.com/jandedobbeleer/oh-my-posh/console"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/shell"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -26,12 +26,13 @@ import (
_ "embed" _ "embed"
"fmt" "fmt"
"math" "math"
"oh-my-posh/color"
"oh-my-posh/regex"
"strconv" "strconv"
"strings" "strings"
"unicode/utf8" "unicode/utf8"
"github.com/jandedobbeleer/oh-my-posh/color"
"github.com/jandedobbeleer/oh-my-posh/regex"
"github.com/esimov/stackblur-go" "github.com/esimov/stackblur-go"
"github.com/fogleman/gg" "github.com/fogleman/gg"
"github.com/golang/freetype/truetype" "github.com/golang/freetype/truetype"

View file

@ -2,11 +2,12 @@ package engine
import ( import (
"io/ioutil" //nolint:staticcheck,nolintlint "io/ioutil" //nolint:staticcheck,nolintlint
"oh-my-posh/color"
"os" "os"
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/color"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -2,10 +2,11 @@ package engine
import ( import (
"fmt" "fmt"
"oh-my-posh/platform"
"oh-my-posh/properties"
"oh-my-posh/segments"
"strings" "strings"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/jandedobbeleer/oh-my-posh/segments"
) )
const ( const (

View file

@ -1,11 +1,12 @@
package engine package engine
import ( import (
"oh-my-posh/mock"
"oh-my-posh/platform"
"oh-my-posh/properties"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -1,10 +1,10 @@
package engine package engine
import ( import (
"oh-my-posh/color" "github.com/jandedobbeleer/oh-my-posh/color"
"oh-my-posh/console" "github.com/jandedobbeleer/oh-my-posh/console"
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"oh-my-posh/shell" "github.com/jandedobbeleer/oh-my-posh/shell"
) )
// New returns a prompt engine initialized with the // New returns a prompt engine initialized with the

View file

@ -1,6 +1,6 @@
package engine package engine
import "oh-my-posh/platform" import "github.com/jandedobbeleer/oh-my-posh/platform"
func shouldHideForWidth(env platform.Environment, minWidth, maxWidth int) bool { func shouldHideForWidth(env platform.Environment, minWidth, maxWidth int) bool {
if maxWidth == 0 && minWidth == 0 { if maxWidth == 0 && minWidth == 0 {

View file

@ -1,9 +1,10 @@
package engine package engine
import ( import (
"oh-my-posh/mock"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -7,11 +7,11 @@ import (
"strings" "strings"
"time" "time"
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/properties"
"oh-my-posh/segments" "github.com/jandedobbeleer/oh-my-posh/segments"
"oh-my-posh/shell" "github.com/jandedobbeleer/oh-my-posh/shell"
"oh-my-posh/template" "github.com/jandedobbeleer/oh-my-posh/template"
c "golang.org/x/text/cases" c "golang.org/x/text/cases"
"golang.org/x/text/language" "golang.org/x/text/language"

View file

@ -2,12 +2,13 @@ package engine
import ( import (
"encoding/json" "encoding/json"
"oh-my-posh/mock"
"oh-my-posh/platform"
"oh-my-posh/properties"
"oh-my-posh/segments"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/jandedobbeleer/oh-my-posh/segments"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -1,4 +1,4 @@
module oh-my-posh module github.com/jandedobbeleer/oh-my-posh
go 1.19 go 1.19

View file

@ -5,8 +5,9 @@ import (
"fmt" "fmt"
"io" "io"
"net/http" "net/http"
"oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
) )
const ( const (

View file

@ -2,10 +2,11 @@ package http
import ( import (
"fmt" "fmt"
"oh-my-posh/mock"
"oh-my-posh/properties"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
mock2 "github.com/stretchr/testify/mock" mock2 "github.com/stretchr/testify/mock"
) )

View file

@ -4,8 +4,9 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"io" "io"
"oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Request struct { type Request struct {

View file

@ -2,10 +2,11 @@ package http
import ( import (
"net" "net"
"oh-my-posh/mock"
"oh-my-posh/properties"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
mock2 "github.com/stretchr/testify/mock" mock2 "github.com/stretchr/testify/mock"
) )

View file

@ -1,6 +1,6 @@
package main package main
import "oh-my-posh/cli" import "github.com/jandedobbeleer/oh-my-posh/cli"
var ( var (
Version = "development" Version = "development"

View file

@ -2,8 +2,9 @@ package main
import ( import (
"bytes" "bytes"
"oh-my-posh/cli"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/cli"
) )
func BenchmarkInit(b *testing.B) { func BenchmarkInit(b *testing.B) {

View file

@ -3,10 +3,11 @@ package mock
import ( import (
"io" "io"
"io/fs" "io/fs"
"oh-my-posh/platform"
"oh-my-posh/platform/battery"
"time" "time"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/platform/battery"
mock "github.com/stretchr/testify/mock" mock "github.com/stretchr/testify/mock"
) )

View file

@ -2,10 +2,11 @@ package battery
import ( import (
"errors" "errors"
"oh-my-posh/platform/cmd"
"oh-my-posh/regex"
"strconv" "strconv"
"strings" "strings"
"github.com/jandedobbeleer/oh-my-posh/platform/cmd"
"github.com/jandedobbeleer/oh-my-posh/regex"
) )
func mapMostLogicalState(state string) State { func mapMostLogicalState(state string) State {

View file

@ -10,10 +10,6 @@ import (
"io/fs" "io/fs"
"net/http" "net/http"
"net/http/httputil" "net/http/httputil"
"oh-my-posh/log"
"oh-my-posh/platform/battery"
"oh-my-posh/platform/cmd"
"oh-my-posh/regex"
"os" "os"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
@ -23,6 +19,11 @@ import (
"sync" "sync"
"time" "time"
"github.com/jandedobbeleer/oh-my-posh/log"
"github.com/jandedobbeleer/oh-my-posh/platform/battery"
"github.com/jandedobbeleer/oh-my-posh/platform/cmd"
"github.com/jandedobbeleer/oh-my-posh/regex"
process "github.com/shirou/gopsutil/v3/process" process "github.com/shirou/gopsutil/v3/process"
) )
@ -574,7 +575,7 @@ func (env *Shell) Shell() string {
} }
env.Debug("Shell", "process name: "+name) env.Debug("Shell", "process name: "+name)
// this is used for when scoop creates a shim, see // this is used for when scoop creates a shim, see
// https://github.com/JanDeDobbeleer/oh-my-posh/issues/2806 // https://github.com/jandedobbeleer/oh-my-posh/issues/2806
executable, _ := os.Executable() executable, _ := os.Executable()
if name == "cmd.exe" || name == executable { if name == "cmd.exe" || name == executable {
p, _ = p.Parent() p, _ = p.Parent()

View file

@ -2,12 +2,13 @@ package platform
import ( import (
"errors" "errors"
"oh-my-posh/regex"
"strconv" "strconv"
"strings" "strings"
"time" "time"
"oh-my-posh/platform/battery" "github.com/jandedobbeleer/oh-my-posh/regex"
"github.com/jandedobbeleer/oh-my-posh/platform/battery"
) )
func mapMostLogicalState(state string) battery.State { func mapMostLogicalState(state string) battery.State {

View file

@ -3,8 +3,9 @@
package platform package platform
import ( import (
"oh-my-posh/platform/battery"
"time" "time"
"github.com/jandedobbeleer/oh-my-posh/platform/battery"
) )
func (env *Shell) BatteryState() (*battery.Info, error) { func (env *Shell) BatteryState() (*battery.Info, error) {

View file

@ -3,13 +3,14 @@ package platform
import ( import (
"errors" "errors"
"fmt" "fmt"
"oh-my-posh/regex"
"reflect" "reflect"
"strings" "strings"
"syscall" "syscall"
"unicode/utf16" "unicode/utf16"
"unsafe" "unsafe"
"github.com/jandedobbeleer/oh-my-posh/regex"
"golang.org/x/sys/windows" "golang.org/x/sys/windows"
) )

View file

@ -2,8 +2,9 @@ package properties
import ( import (
"fmt" "fmt"
"oh-my-posh/color"
"oh-my-posh/regex" "github.com/jandedobbeleer/oh-my-posh/color"
"github.com/jandedobbeleer/oh-my-posh/regex"
) )
type Properties interface { type Properties interface {

View file

@ -1,9 +1,10 @@
package segments package segments
import ( import (
"oh-my-posh/platform"
"oh-my-posh/properties"
"path/filepath" "path/filepath"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Angular struct { type Angular struct {

View file

@ -2,9 +2,10 @@ package segments
import ( import (
"fmt" "fmt"
"oh-my-posh/platform"
"oh-my-posh/properties"
"strings" "strings"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Aws struct { type Aws struct {

View file

@ -1,10 +1,11 @@
package segments package segments
import ( import (
"oh-my-posh/mock"
"oh-my-posh/properties"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -3,10 +3,11 @@ package segments
import ( import (
"encoding/json" "encoding/json"
"errors" "errors"
"oh-my-posh/platform"
"oh-my-posh/properties"
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Az struct { type Az struct {

View file

@ -1,8 +1,8 @@
package segments package segments
import ( import (
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/properties"
) )
type AzFunc struct { type AzFunc struct {

View file

@ -1,13 +1,14 @@
package segments package segments
import ( import (
"oh-my-posh/mock"
"oh-my-posh/platform"
"oh-my-posh/properties"
"os" "os"
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -1,9 +1,9 @@
package segments package segments
import ( import (
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"oh-my-posh/platform/battery" "github.com/jandedobbeleer/oh-my-posh/platform/battery"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Battery struct { type Battery struct {

View file

@ -7,10 +7,11 @@ import (
"fmt" "fmt"
"math" "math"
"net/http" "net/http"
"oh-my-posh/platform"
"oh-my-posh/properties"
"sort" "sort"
"time" "time"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
) )
// segment struct, makes templating easier // segment struct, makes templating easier

View file

@ -2,11 +2,12 @@ package segments
import ( import (
"fmt" "fmt"
"oh-my-posh/mock"
"oh-my-posh/properties"
"testing" "testing"
"time" "time"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -2,8 +2,9 @@ package segments
import ( import (
"encoding/json" "encoding/json"
"oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Cds struct { type Cds struct {

View file

@ -2,12 +2,13 @@ package segments
import ( import (
"fmt" "fmt"
"oh-my-posh/mock"
"oh-my-posh/platform"
"oh-my-posh/properties"
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -1,8 +1,8 @@
package segments package segments
import ( import (
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Cf struct { type Cf struct {

View file

@ -1,9 +1,10 @@
package segments package segments
import ( import (
"oh-my-posh/platform"
"oh-my-posh/properties"
"regexp" "regexp"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
) )
type CfTarget struct { type CfTarget struct {

View file

@ -2,11 +2,12 @@ package segments
import ( import (
"fmt" "fmt"
"oh-my-posh/mock"
"oh-my-posh/properties"
"os/exec" "os/exec"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -2,12 +2,13 @@ package segments
import ( import (
"fmt" "fmt"
"oh-my-posh/mock"
"oh-my-posh/platform"
"oh-my-posh/properties"
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -1,8 +1,8 @@
package segments package segments
import ( import (
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Cmake struct { type Cmake struct {

View file

@ -1,9 +1,10 @@
package segments package segments
import ( import (
"oh-my-posh/platform"
"oh-my-posh/properties"
"strings" "strings"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Cmd struct { type Cmd struct {

View file

@ -1,10 +1,11 @@
package segments package segments
import ( import (
"oh-my-posh/mock"
"oh-my-posh/properties"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -1,9 +1,10 @@
package segments package segments
import ( import (
"oh-my-posh/platform"
"oh-my-posh/properties"
"strings" "strings"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Connection struct { type Connection struct {

View file

@ -2,11 +2,12 @@ package segments
import ( import (
"fmt" "fmt"
"oh-my-posh/mock"
"oh-my-posh/platform"
"oh-my-posh/properties"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -1,8 +1,8 @@
package segments package segments
import ( import (
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Crystal struct { type Crystal struct {

View file

@ -1,8 +1,8 @@
package segments package segments
import ( import (
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/properties"
) )
var ( var (

View file

@ -1,8 +1,8 @@
package segments package segments
import ( import (
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Deno struct { type Deno struct {

View file

@ -1,9 +1,9 @@
package segments package segments
import ( import (
"oh-my-posh/constants" "github.com/jandedobbeleer/oh-my-posh/constants"
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Dotnet struct { type Dotnet struct {

View file

@ -1,12 +1,13 @@
package segments package segments
import ( import (
"oh-my-posh/constants"
"oh-my-posh/mock"
"oh-my-posh/platform"
"oh-my-posh/properties"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/constants"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -2,10 +2,11 @@ package segments
import ( import (
"fmt" "fmt"
"oh-my-posh/platform"
"oh-my-posh/properties"
"strconv" "strconv"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
lang "golang.org/x/text/language" lang "golang.org/x/text/language"
"golang.org/x/text/message" "golang.org/x/text/message"
) )

View file

@ -1,11 +1,12 @@
package segments package segments
import ( import (
"oh-my-posh/mock"
"oh-my-posh/properties"
"testing" "testing"
"time" "time"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -1,9 +1,10 @@
package segments package segments
import ( import (
"oh-my-posh/platform"
"oh-my-posh/properties"
"strconv" "strconv"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Exit struct { type Exit struct {

View file

@ -1,11 +1,12 @@
package segments package segments
import ( import (
"oh-my-posh/mock"
"oh-my-posh/platform"
"oh-my-posh/properties"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -1,8 +1,8 @@
package segments package segments
import ( import (
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Flutter struct { type Flutter struct {

View file

@ -2,11 +2,12 @@ package segments
import ( import (
"fmt" "fmt"
"oh-my-posh/mock"
"oh-my-posh/properties"
"strings" "strings"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -2,10 +2,11 @@ package segments
import ( import (
"errors" "errors"
"oh-my-posh/platform"
"oh-my-posh/properties"
"path" "path"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
"gopkg.in/ini.v1" "gopkg.in/ini.v1"
) )

View file

@ -4,8 +4,8 @@ import (
"path" "path"
"testing" "testing"
"oh-my-posh/mock" "github.com/jandedobbeleer/oh-my-posh/mock"
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
mock2 "github.com/stretchr/testify/mock" mock2 "github.com/stretchr/testify/mock"

View file

@ -3,13 +3,14 @@ package segments
import ( import (
"fmt" "fmt"
url2 "net/url" url2 "net/url"
"oh-my-posh/platform"
"oh-my-posh/properties"
"oh-my-posh/regex"
"path/filepath" "path/filepath"
"strconv" "strconv"
"strings" "strings"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/jandedobbeleer/oh-my-posh/regex"
"gopkg.in/ini.v1" "gopkg.in/ini.v1"
) )

View file

@ -3,14 +3,15 @@ package segments
import ( import (
"errors" "errors"
"fmt" "fmt"
"oh-my-posh/mock"
"oh-my-posh/platform"
"oh-my-posh/properties"
"os" "os"
"path/filepath" "path/filepath"
"strings" "strings"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -3,8 +3,9 @@ package segments
import ( import (
"encoding/json" "encoding/json"
"errors" "errors"
"oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
) )
type gitVersion struct { type gitVersion struct {

View file

@ -2,10 +2,11 @@ package segments
import ( import (
"errors" "errors"
"oh-my-posh/mock"
"oh-my-posh/properties"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/alecthomas/assert" "github.com/alecthomas/assert"
mock2 "github.com/stretchr/testify/mock" mock2 "github.com/stretchr/testify/mock"
) )

View file

@ -1,8 +1,8 @@
package segments package segments
import ( import (
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/properties"
"golang.org/x/mod/modfile" "golang.org/x/mod/modfile"
) )

View file

@ -3,12 +3,13 @@ package segments
import ( import (
"errors" "errors"
"fmt" "fmt"
"oh-my-posh/mock"
"oh-my-posh/platform"
"oh-my-posh/properties"
"os" "os"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -1,8 +1,8 @@
package segments package segments
import ( import (
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Haskell struct { type Haskell struct {

View file

@ -3,11 +3,12 @@ package segments
import ( import (
"errors" "errors"
"fmt" "fmt"
"oh-my-posh/mock"
"oh-my-posh/platform"
"oh-my-posh/properties"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -2,9 +2,10 @@ package segments
import ( import (
"net" "net"
"oh-my-posh/http"
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/http"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
) )
type ipData struct { type ipData struct {

View file

@ -3,9 +3,10 @@ package segments
import ( import (
"errors" "errors"
"net" "net"
"oh-my-posh/mock"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
mock2 "github.com/stretchr/testify/mock" mock2 "github.com/stretchr/testify/mock"
) )

View file

@ -2,8 +2,9 @@ package segments
import ( import (
"errors" "errors"
"oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
) )
type ITerm struct { type ITerm struct {

View file

@ -1,9 +1,10 @@
package segments package segments
import ( import (
"oh-my-posh/mock"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -2,8 +2,9 @@ package segments
import ( import (
"fmt" "fmt"
"oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Java struct { type Java struct {

View file

@ -2,10 +2,11 @@ package segments
import ( import (
"fmt" "fmt"
"oh-my-posh/mock"
"oh-my-posh/properties"
"testing" "testing"
"github.com/jandedobbeleer/oh-my-posh/mock"
"github.com/jandedobbeleer/oh-my-posh/properties"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -1,8 +1,8 @@
package segments package segments
import ( import (
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Julia struct { type Julia struct {

View file

@ -1,8 +1,8 @@
package segments package segments
import ( import (
"oh-my-posh/platform" "github.com/jandedobbeleer/oh-my-posh/platform"
"oh-my-posh/properties" "github.com/jandedobbeleer/oh-my-posh/properties"
) )
type Kotlin struct { type Kotlin struct {

View file

@ -1,10 +1,11 @@
package segments package segments
import ( import (
"oh-my-posh/platform"
"oh-my-posh/properties"
"path/filepath" "path/filepath"
"github.com/jandedobbeleer/oh-my-posh/platform"
"github.com/jandedobbeleer/oh-my-posh/properties"
"gopkg.in/yaml.v3" "gopkg.in/yaml.v3"
) )

Some files were not shown because too many files have changed in this diff Show more