github.com/bir3/gocompiler@v0.3.205/src/cmd/internal/osinfo/os_js.go (about)

     1  // Copyright 2022 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 js
     6  
     7  package osinfo
     8  
     9  import (
    10  	"fmt"
    11  )
    12  
    13  // Version returns the OS version name/number.
    14  func Version() (string, error) {
    15  	// Version detection on wasm varies depending on the underlying runtime
    16  	// (browser, node, etc), nor is there a standard via something like
    17  	// WASI (see https://go.dev/issue/31105). We could attempt multiple
    18  	// combinations, but for now we leave this unimplemented for
    19  	// simplicity.
    20  	return "", fmt.Errorf("unimplemented")
    21  }