Source file src/cmd/go/internal/telemetrystats/version_windows.go

     1  // Copyright 2024 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build !cmd_go_bootstrap && windows
     6  
     7  package telemetrystats
     8  
     9  import (
    10  	"fmt"
    11  
    12  	"cmd/internal/telemetry/counter"
    13  
    14  	"golang.org/x/sys/windows"
    15  )
    16  
    17  func incrementVersionCounters() {
    18  	v := windows.RtlGetVersion()
    19  	counter.Inc(fmt.Sprintf("go/platform/host/windows/major-version:%d", v.MajorVersion))
    20  	counter.Inc(fmt.Sprintf("go/platform/host/windows/version:%d-%d", v.MajorVersion, v.MinorVersion))
    21  	counter.Inc(fmt.Sprintf("go/platform/host/windows/build:%d", v.BuildNumber))
    22  }
    23  

View as plain text