pkg.re/essentialkaos/ek.10@v12.41.0+incompatible/system/info_linux_basic.go (about)

     1  //go:build linux && (386 || arm64 || amd64)
     2  // +build linux
     3  // +build 386 arm64 amd64
     4  
     5  package system
     6  
     7  // ////////////////////////////////////////////////////////////////////////////////// //
     8  //                                                                                    //
     9  //                         Copyright (c) 2022 ESSENTIAL KAOS                          //
    10  //      Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0>     //
    11  //                                                                                    //
    12  // ////////////////////////////////////////////////////////////////////////////////// //
    13  
    14  // byteSliceToString convert byte slice to string
    15  func byteSliceToString(s [65]int8) string {
    16  	result := ""
    17  
    18  	for _, r := range s {
    19  		if r == 0 {
    20  			break
    21  		}
    22  
    23  		result += string(rune(r))
    24  	}
    25  
    26  	return result
    27  }