github.com/TrueBlocks/trueblocks-core/src/apps/chifra@v0.0.0-20241022031540-b362680128f7/sdk/traces.go (about) 1 // Copyright 2016, 2024 The TrueBlocks Authors. All rights reserved. 2 // Use of this source code is governed by a license that can 3 // be found in the LICENSE file. 4 /* 5 * Parts of this file were auto generated. Edit only those parts of 6 * the code inside of 'EXISTING_CODE' tags. 7 */ 8 9 package sdk 10 11 import ( 12 "io" 13 "net/url" 14 15 traces "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/internal/traces" 16 "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/output" 17 outputHelpers "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/output/helpers" 18 ) 19 20 // Traces provides an interface to the command line chifra traces through the SDK. 21 func Traces(rCtx *output.RenderCtx, w io.Writer, values url.Values) error { 22 traces.ResetOptions(sdkTestMode) 23 opts := traces.TracesFinishParseInternal(w, values) 24 // EXISTING_CODE 25 // EXISTING_CODE 26 outputHelpers.InitJsonWriterApi("traces", w, &opts.Globals) 27 err := opts.TracesInternal(rCtx) 28 outputHelpers.CloseJsonWriterIfNeededApi("traces", err, &opts.Globals) 29 30 return err 31 } 32 33 // EXISTING_CODE 34 // EXISTING_CODE