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 {
|
||||
File string `json:"file"`
|
||||
Line int `json:"line"`
|
||||
Column int `json:"column"`
|
||||
File string
|
||||
Line int
|
||||
Column int
|
||||
}
|
||||
|
||||
func (l Location) String() string {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package dyn_test
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/databricks/cli/libs/dyn"
|
||||
|
@ -25,10 +24,3 @@ func TestLocationDirectoryNoFile(t *testing.T) {
|
|||
_, err := loc.Directory()
|
||||
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