Skip to content

Commit

Permalink
Use semconv pkg for schema URL in fetch.go
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlias committed Sep 15, 2023
1 parent 2dd287d commit 2088cee
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions sdk/resource/internal/schema/generate/schema/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,17 @@ import (
"log"
"net/http"
"os"
)

const (
// schemaURL is the target schema to download.
schemaURL = "https://opentelemetry.io/schemas/1.21.0"

// dest is the output file.
dest = "schema.yaml"
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
)

// dest is the output file.
const dest = "schema.yaml"

func run() error {
resp, err := http.Get(schemaURL)
resp, err := http.Get(semconv.SchemaURL)
if err != nil {
return fmt.Errorf("failed to download %q: %w", schemaURL, err)
return fmt.Errorf("failed to download %q: %w", semconv.SchemaURL, err)
}
defer resp.Body.Close()

Expand Down

0 comments on commit 2088cee

Please sign in to comment.