From 80cbfe9da33ed8ae2dc3c1318b784d2e2087dc69 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Mon, 27 Jan 2025 17:05:04 +0100 Subject: [PATCH] Revert changes to dyn.Location --- libs/dyn/location.go | 6 +++--- libs/dyn/location_test.go | 8 -------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/libs/dyn/location.go b/libs/dyn/location.go index 5de0ed1a4..d2b2ad596 100644 --- a/libs/dyn/location.go +++ b/libs/dyn/location.go @@ -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 { diff --git a/libs/dyn/location_test.go b/libs/dyn/location_test.go index 12eb5742a..e11f7cb56 100644 --- a/libs/dyn/location_test.go +++ b/libs/dyn/location_test.go @@ -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)) -}