The operating system provides a lot of ways for applications to extract information and perform operations. You will look at the different ways to extract system-level information and use both the Go standard library and system files.
- Syscall Package
The syscall package is the standard library provided by Go that provides function calls that interface with the log-level operating system. The following are some of the functionalities provided by the package:
• Change directory
• Duplicate file descriptor
• Get current working directory
• ...and many more
package main
import (
"log"
s "syscall" )
func main() {
...
log.Println("Getpid : ", s.Getpid())
...
_, err := s.Getcwd(c)
... }
- ELF Package
标签:...,log,ELF,System,system,Go,Using,standard From: https://www.cnblogs.com/bcb51/p/17069262.htmlHigh-Level ELF Format
ELF is a common standard file format for executable files, object code,
shared libraries, and core dumps; it is cross platform.