wille/osutil

Error in Chinese operating system

Opened this issue · 1 comments

package main

import (
	"fmt"

	"github.com/wille/osutil"
)

func main() {
	fmt.Println(osutil.GetDisplay())
}

panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
github.com/wille/osutil.GetVersion(0x43b461, 0x5a5ea0)
E:/Home/go/pkg/mod/github.com/wille/osutil@v0.0.0-20190526221756-e91b8656e290/os_windows.go:41 +0x32c
github.com/wille/osutil.GetDisplay(...)
E:/Home/go/pkg/mod/github.com/wille/osutil@v0.0.0-20190526221756-e91b8656e290/os_windows.go:69

cmd>ver

Microsoft Windows [版本 10.0.18362.657]
cupen commented

@millken Hello, I make a pr for it.