mirror of https://github.com/databricks/cli.git
Revert changes to dyn.Location
This commit is contained in:
parent
76c671f72b
commit
80cbfe9da3
|
@ -7,9 +7,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type Location struct {
|
type Location struct {
|
||||||
File string `json:"file"`
|
File string
|
||||||
Line int `json:"line"`
|
Line int
|
||||||
Column int `json:"column"`
|
Column int
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l Location) String() string {
|
func (l Location) String() string {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package dyn_test
|
package dyn_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/databricks/cli/libs/dyn"
|
"github.com/databricks/cli/libs/dyn"
|
||||||
|
@ -25,10 +24,3 @@ func TestLocationDirectoryNoFile(t *testing.T) {
|
||||||
_, err := loc.Directory()
|
_, err := loc.Directory()
|
||||||
assert.Error(t, err)
|
assert.Error(t, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestLocationMarshal(t *testing.T) {
|
|
||||||
loc := dyn.Location{File: "file", Line: 1, Column: 2}
|
|
||||||
buf, err := json.Marshal(loc)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
assert.Equal(t, `{"file":"file","line":1,"column":2}`, string(buf))
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue