Skip to content

Commit

Permalink
fix: added remaining name improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Meet Soni <meetsoni3017@gmail.com>
  • Loading branch information
inosmeet committed Oct 20, 2024
1 parent 901203a commit 90008e4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions cmd/query/app/http_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,16 +363,16 @@ func (aH *APIHandler) metrics(w http.ResponseWriter, r *http.Request, getMetrics
aH.writeJSON(w, r, m)
}

func (aH *APIHandler) convertModelToUI(modelTrace *model.Trace, adjust bool) (*ui.Trace, *structuredError) {
func (aH *APIHandler) convertModelToUI(trc *model.Trace, adjust bool) (*ui.Trace, *structuredError) {
var errs []error
if adjust {
var err error
modelTrace, err = aH.queryService.Adjust(modelTrace)
trc, err = aH.queryService.Adjust(trc)
if err != nil {
errs = append(errs, err)
}
}
uiTrace := uiconv.FromDomain(modelTrace)
uiTrace := uiconv.FromDomain(trc)
var uiError *structuredError
if err := errors.Join(errs...); err != nil {
uiError = &structuredError{
Expand Down
6 changes: 3 additions & 3 deletions model/converter/thrift/zipkin/to_domain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ func TestToDomainWithDurationFromClientAnnotations(t *testing.T) {
{"value": "cs", "timestamp": 1, "host": {"service_name": "bar", "ipv4": 23456}},
{"value": "cr", "timestamp": 10, "host": {"service_name": "bar", "ipv4": 23456}}
]}]`)
domainTrace, err := ToDomain(zSpans)
trc, err := ToDomain(zSpans)
require.NoError(t, err)
assert.Equal(t, 1000, int(domainTrace.Spans[0].StartTime.Nanosecond()))
assert.Equal(t, 9000, int(domainTrace.Spans[0].Duration))
assert.Equal(t, 1000, int(trc.Spans[0].StartTime.Nanosecond()))
assert.Equal(t, 9000, int(trc.Spans[0].Duration))
}

func TestToDomainMultipleSpanKinds(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/gzipfs/gzip.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ func (fileInfo) Sys() any { return nil }

// New wraps underlying fs that is expected to contain gzipped files
// and presents an unzipped view of it.
func New(filesystem fs.FS) fs.FS {
return fileSystem{filesystem}
func New(fileSys fs.FS) fs.FS {
return fileSystem{fileSys}
}

func (cfs fileSystem) Open(path string) (fs.File, error) {
Expand Down

0 comments on commit 90008e4

Please sign in to comment.