mirror of
https://github.com/hanzoai/traces.git
synced 2026-10-30 18:20:41 +00:00
* Split docs Signed-off-by: Joe Elliott <[email protected]> * docs cleanup Signed-off-by: Joe Elliott <[email protected]> * tweaks Signed-off-by: Joe Elliott <[email protected]> * lint Signed-off-by: Joe Elliott <[email protected]> * fix test Signed-off-by: Joe Elliott <[email protected]> --------- Signed-off-by: Joe Elliott <[email protected]>
41 lines
872 B
Go
41 lines
872 B
Go
package docs
|
|
|
|
import (
|
|
_ "embed"
|
|
)
|
|
|
|
const (
|
|
DocsTypeBasic = "basic" // all intrinsics, operators and attributes syntaxes. overview of other doc types
|
|
DocsTypeAggregates = "aggregates" // count, sum, etc.
|
|
DocsTypeStructural = "structural"
|
|
DocsTypeMetrics = "metrics"
|
|
)
|
|
|
|
//go:embed basic.md
|
|
var docsBasic string
|
|
|
|
//go:embed aggregates.md
|
|
var docsAggregates string
|
|
|
|
//go:embed structural.md
|
|
var docsStructural string
|
|
|
|
//go:embed metrics.md
|
|
var docsMetrics string
|
|
|
|
// GetDocsContent returns the appropriate documentation content based on the doc type
|
|
func GetDocsContent(docType string) string {
|
|
switch docType {
|
|
case DocsTypeBasic:
|
|
return docsBasic
|
|
case DocsTypeAggregates:
|
|
return docsAggregates
|
|
case DocsTypeStructural:
|
|
return docsStructural
|
|
case DocsTypeMetrics:
|
|
return docsMetrics
|
|
default:
|
|
return docsBasic // fallback to basic docs
|
|
}
|
|
}
|