psutil for golang

gopsutil: psutil for golang

https://coveralls.io/repos/shirou/gopsutil/badge.svg?branch=master

This is a port of psutil (https://github.com/giampaolo/psutil). The challenge is porting all psutil functions on some architectures.

v3 migration

from v3.20.10, gopsutil becomes v3 which breaks backawards compatiblity. See v3Changes.md more detail changes.

Tag semantics

gopsutil tag policy is almost same as Semantic Versioning, but automatically increase like Ubuntu versioning.

for example, v2.17.04 means

  • v2: major version
  • 17: release year, 2017
  • 04: release month

gopsutil aims to keep backwards-compatiblity until major version change.

Taged at every end of month, but there are only a few commits, it can be skipped.

Available Architectures

  • FreeBSD i386/amd64/arm
  • Linux i386/amd64/arm(raspberry pi)
  • Windows/amd64
  • Darwin i386/amd64
  • OpenBSD amd64 (Thank you @mpfz0r!)
  • Solaris amd64 (developed and tested on SmartOS/Illumos, Thank you @jen20!)

These are partial support:

  • CPU on DragonFly BSD (#893, Thank you @gballet!)
  • host on Linux RISC-V (#896, Thank you @tklauser!)

All works are implemented without cgo by porting c struct to golang struct.

Usage

package main

import (
    "fmt"

    "github.com/shirou/gopsutil/v3/mem"
    // "github.com/shirou/gopsutil/mem"  // to use v2
)

func main() {
    v, _ := mem.VirtualMemory()

    // almost every return value is a struct
    fmt.Printf("Total: %v, Free:%v, UsedPercent:%f%%\n", v.Total, v.Free, v.UsedPercent)

    // convert to JSON. String() is also implemented
    fmt.Println(v)
}

The output is below.

Total: 3179569152, Free:284233728, UsedPercent:84.508194%
{"total":3179569152,"available":492572672,"used":2895335424,"usedPercent":84.50819439828305, (snip...)}

You can set an alternative location to /proc by setting the HOST_PROC environment variable.

You can set an alternative location to /sys by setting the HOST_SYS environment variable.

You can set an alternative location to /etc by setting the HOST_ETC environment variable.

You can set an alternative location to /var by setting the HOST_VAR environment variable.

You can set an alternative location to /run by setting the HOST_RUN environment variable.

You can set an alternative location to /dev by setting the HOST_DEV environment variable.

Documentation

see http://godoc.org/github.com/shirou/gopsutil

Requirements

  • go1.11 or above is required.

More Info

Several methods have been added which are not present in psutil, but will provide useful information.

  • host/HostInfo() (linux)
    • Hostname
    • Uptime
    • Procs
    • OS (ex: "linux")
    • Platform (ex: "ubuntu", "arch")
    • PlatformFamily (ex: "debian")
    • PlatformVersion (ex: "Ubuntu 13.10")
    • VirtualizationSystem (ex: "LXC")
    • VirtualizationRole (ex: "guest"/"host")
  • IOCounters
  • cpu/CPUInfo() (linux, freebsd)
    • CPU (ex: 0, 1, ...)
    • VendorID (ex: "GenuineIntel")
    • Family
    • Model
    • Stepping
    • PhysicalID
    • CoreID
    • Cores (ex: 2)
    • ModelName (ex: "Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz")
    • Mhz
    • CacheSize
    • Flags (ex: "fpu vme de pse tsc msr pae mce cx8 ...")
    • Microcode
  • load/LoadAvg() (linux, freebsd)
    • Load1
    • Load5
    • Load15
  • docker/GetDockerIDList() (linux only)
    • container id list ([]string)
  • docker/CgroupCPU() (linux only)
    • user
    • system
  • docker/CgroupMem() (linux only)
    • various status
  • net_protocols (linux only)
    • system wide stats on network protocols (i.e IP, TCP, UDP, etc.)
    • sourced from /proc/net/snmp
  • iptables nf_conntrack (linux only)
    • system wide stats on netfilter conntrack module
    • sourced from /proc/sys/net/netfilter/nf_conntrack_count

Some codes are ported from Ohai. many thanks.

Current Status

  • x: work
  • b: almost works, but something is broken

Process class

name Linux FreeBSD OpenBSD MacOSX Windows
pid x x x x x
ppid x x x x x
name x x x x x
cmdline x x   x x
create_time x     x x
status x x x x  
cwd x        
exe x x x   x
uids x x x x  
gids x x x x  
terminal x x x x  
io_counters x x x   x
nice x x x x x
num_fds x        
num_ctx_switches x        
num_threads x x x x x
cpu_times x       x
memory_info x x x x x
memory_info_ex x        
memory_maps x        
open_files x        
send_signal x x x x  
suspend x x x x  
resume x x x x  
terminate x x x x x
kill x x x x  
username x x x x x
ionice          
rlimit x        
num_handlers          
threads x        
cpu_percent x   x x  
cpu_affinity          
memory_percent          
parent x   x x x
children x x x x x
connections x   x x  
is_running          
page_faults x        

Original Metrics

item Linux FreeBSD OpenBSD MacOSX Windows Solaris
HostInfo            
hostname x x x x x x
uptime x x x x   x
proces x x x     x
os x x x x x x
platform x x x x   x
platformfamily x x x x   x
virtualization x          
CPU            
VendorID x x x x x x
Family x x x x x x
Model x x x x x x
Stepping x x x x x x
PhysicalID x         x
CoreID x         x
Cores x       x x
ModelName x x x x x x
Microcode x         x
LoadAvg            
Load1 x x x x    
Load5 x x x x    
Load15 x x x x    
GetDockerID            
container id x no no no no  
CgroupsCPU            
user x no no no no  
system x no no no no  
CgroupsMem            
various x no no no no  
  • future work
    • process_iter
    • wait_procs
    • Process class
      • as_dict
      • wait

License

New BSD License (same as psutil)

Related Works

I have been influenced by the following great works:

How to Contribute

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

My English is terrible, so documentation or correcting comments are also welcome.

Comments
  • Make types for OpenBSD/arm64

    Make types for OpenBSD/arm64

    As requested here.

    These were generated on OpenBSD-current on a Raspberry Pi 4.

    Can you tell me how to test the build and run the test suite? I don't know anything about golang!

    Fixes #992

  • proc.Percent()

    proc.Percent()

    I am trying to get cpu usage for a process. However, I am getting 0 as the value always. Below is my sample code. I am using telegraf procstat plugin. Even there it's returning 0 value

    ` func main() {

    var pid int32
    pid = 10172
    proc, _ := process.NewProcess(pid)
    p, err := proc.Percent(time.Duration(0))
    if err != nil {
       fmt.Println(err)
    }
    

    }`

    Thanks

  • Mhz copied to CPU on FreeBSD

    Mhz copied to CPU on FreeBSD

    I noticed CPU outputs value of MHz instead of number on CPUs. I thought CPU is used to output number of physical CPUs.

    I think dmesg might help here to get the right number. Here are a few examples from our servers

    • (2phys CPUs no HT) FreeBSD/SMP: 2 package(s) x 4 core(s) hw.ncpu=8
    • (1 phys CPUs) FreeBSD/SMP: 1 package(s) x 2 core(s) x 2 hardware threads hw.ncpu=4
    • (1 phys CPUs) FreeBSD/SMP: 1 package(s) x 4 core(s) x 2 SMT threads hw.ncpu=8
    • (1 phys CPUs) FreeBSD/SMP: 1 package(s) x 6 core(s) x 2 SMT threads hw.ncpu=12
  • disk: device mapper name in linux

    disk: device mapper name in linux

    I would like to support device mapper naming in linux for the disk module.

    It's not as exotic as it sounds, eg LVM devices get a mapper name; but my main interest is is multipath devices.

    to get the name, there's following https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-block-dm

    so given device name abc it is as easy as trying to get the content of /sys/block/abc/dm/name. it will be empty for non-dm devices and for older kernels or system without /sys mounted

    my main question is: would such feature get merged? and if so, what attributename can i use for that?

    i would implement it similar to getSerialNumber and maybe add it in IOCounter as d.DMName = getDeviceMapperName(), similar to the way the serial number is added.

  • Fix broken retrieval of OpenBSD CPU metrics

    Fix broken retrieval of OpenBSD CPU metrics

    CPU metrics are broken on OpenBSD 7.0-CURRENT as described in #1239. I believe that the problem is the multiplication of the CPU incrementer by 2 when the code walks through the available CPUs to gather CPU time metrics. The code makes uses of the KERN_CPTIME2 sysctl to fetch per-CPU time metrics.

    Looking at the kernel code behind this particular sysctl, we have this.. As you can see, it's calling a CPU_INFO_FOREACH macro and iterating through the results until it has the info for the requested CPU. This macro is defined per-architecture and in every one that I found, it's just iterating through cpu_info structs defined here.

    I can't find anything that leads me to believe that this Go code should be incrementing by anything other than 1.

    In the entire OpenBSD codebase, there's only one use of the KERN_CPTIME2 sysctl and that's in snmpd's source code, which iterates through the CPUs and it does this by incrementing the counter by 1.

    This particular code ^ hasn't changed since 2016 and I'll bet it still works. :-)

    Here's another clue. As I mentioned, the guts of this syscall is just iterating through cpu_info struct. I looked around for other uses of this struct and found code for the new OpenBSD debugger. There are different implementations for different architectures, but for amd64, it also increments through CPUs by 1.

    Here is a PR to fix this. I only have one OpenBSD machine to test on, a simple Dell Optiplex workstation.

  • Cache common/common_linux.Virtualization()

    Cache common/common_linux.Virtualization()

    By assuming virtualization environment won't change during a the program's runtime, we can cache common/common_linux.Virtualization() with a simple map to reduce amount of system calls. I first mentioned this issue at 890

  • go.mod does not specify v2 version

    go.mod does not specify v2 version

    The go.mod file in this repo does not specify the /v2 tag so if this module is imported in any project, it will be imported with +incompatible From the official documentation (https://github.com/golang/go/wiki/Modules)

    The module path (such as module foo/v2) declared at the start of a module's go.mod file is both: the definitive declaration of that module's identity the definitive declaration of how that module must be imported by consuming code

    A module can import a v2+ package that has not opted in to modules itself. A non-module v2+ package that has a valid v2+ semver tag will be recorded with an +incompatible suffix in the importing module's go.mod file. The +incompatible suffix indicates that even though the v2+ package has a valid v2+ semver tag such as v2.0.0, the v2+ package has not actively opted in to modules and hence that v2+ package is assumed to have not been created with an understanding of the implications of Semantic Import Versioning and how to use major versions in import paths. Therefore, when operating in module mode, the go tool will treat a non-module v2+ package as an (incompatible) extension of the v1 version series of the package and assume the package has no awareness of Semantic Import Versioning, and the +incompatible suffix is an indication that the go tool is doing so.

    Tested this on centos linux and saw this in my go.mod file github.com/shirou/gopsutil v2.18.12+incompatible When I tested this, the current tag was 2.19.03 My go version go version go1.11 linux/amd64

  • add bedrock linux support

    add bedrock linux support

    on bedrock linux installs, gopsutil improperly detects the operating system as the operating system of the strata the program is being run from. this pull request adds in another utility function that detects the /bedrock folder at the root of the system and if it finds it, it changes the files being read from and properly detects the operating system as being bedrock linux

  • Deprecated code in macOS Monterey

    Deprecated code in macOS Monterey

    Describe the bug There is a deprecation messages while building code with gopsutil v3.

    # github.com/shirou/gopsutil/disk
    iostat_darwin.c:28:2: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:132:1: note: 'IOMasterPort' has been explicitly marked deprecated here
    # github.com/shirou/gopsutil/host
    smc_darwin.c:75:41: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:123:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
    

    To Reproduce

    package main
    
    import (
    	_ "github.com/shirou/gopsutil/cpu"
    	_ "github.com/shirou/gopsutil/disk"
    	_ "github.com/shirou/gopsutil/host"
    	_ "github.com/shirou/gopsutil/mem"
    )
    
    func main() {}
    

    Expected behavior There isn't any messages about deprecation.

    Environment (please complete the following information):

    • [x] Mac OS: [paste the result of sw_vers and uname -a
    ProductName:	macOS
    ProductVersion:	12.0.1
    BuildVersion:	21A559
    
    Darwin MacBook-Pro.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64
    
  • [windows]services: add windows service feature

    [windows]services: add windows service feature

    Hi, @shirou I write windows service package to implement like psutil win_services.

    usage:

    
    import (
    	"fmt"
    	"log"
    
    	"github.com/shirou/gopsutil/winservices"
    )
    
    func main() {
            name := "MySQL57"
    	srv, err := winservices.NewService(name)
    	if err != nil {
    		log.Fatalf("get service by name error, %s", err)
    	}
    	if err := srv.GetServiceDetail(); err != nil {
    		log.Fatalf("get service %s error, %s", name, err)
    	}
    
           services, err := winservices.ListServices()
    	if err != nil {
    		log.Fatal(err)
    	}
    }
    

    implement #524, please check it. I don't know how to write test code for this feature, can you tell me? thanks :)

  • processor, v3/processor (Win): fix slow cpuinfo on multisocket config

    processor, v3/processor (Win): fix slow cpuinfo on multisocket config

    updated win32_Processor struct to exclude (unused) LoadPercentage field. The loadpercentage takes linearly more time as the # of sockets increases. By default vSphere maps 1 vCPU to 1 socket, resulting in very poor performance when getting CPU info against, saying, 40 vCPU VM (basically 40 sockets as seen by the VM).

    Here is the before and after time comparison: printcpu-diff

    changes:

    for cpu: since Win32_Processor is a public struct, created a substruct named: Win32_ProcessorWithoutLoadPct for use in all queries without breaking any potential usage of the public api.

    for v3/cpu: since the struct now is private, simply removed LoadPercentage

  • [host][freebsd] Users() returns incorrect

    [host][freebsd] Users() returns incorrect "Started" timestamp

    link https://github.com/shirou/gopsutil/issues/709

    log

    2022-08-06 16:36:43
    1970-01-04 16:55:46
    NUM: 0       USER: xr TTY: console FROM:                 [email protected]: 291346
    2022-08-06 16:36:43
    1970-01-09 01:11:30
    NUM: 1       USER: xr TTY: ttys003 FROM:                 [email protected]: 666690
    

    code

    	users, err := host.Users()
    	if err != nil {
    		log.Println(err)
    		return
    	}
    	for i := 0; i < len(users); i++ {
    		user := users[i]
    		fmt.Println(time.Unix(1659775003, 0).Format("2006-01-02 15:04:05"))
    		fmt.Println(time.Unix(int64(user.Started), 0).Format("2006-01-02 15:04:05"))
    		fmt.Printf("NUM: %-7d USER: %v TTY: %-5v FROM: %-15v [email protected]: %v\n", i, user.User, user.Terminal, user.Host, user.Started)
    	}
    
  • [WIP] Add sensor values for m1

    [WIP] Add sensor values for m1

    Added the necessary ids for sensors on m1 machines from https://github.com/exelban/stats/blob/master/Modules/Sensors/values.swift#L232 Still returns 0 😔 Signed-off-by: shubhindia [email protected]

  • Whether linux/loong64 can be supported?

    Whether linux/loong64 can be supported?

    ../../../pkg/mod/github.com/shirou/gopsutil/[email protected]/host/host_linux.go:98:22: undefined: sizeOfUtmp ../../../pkg/mod/github.com/shirou/gopsutil/[email protected]/host/host_linux.go:103:14: undefined: sizeOfUtmp ../../../pkg/mod/github.com/shirou/gopsutil/[email protected]/host/host_linux.go:105:9: undefined: utmp

  • SensorsTemperatures returns 0 values for all sensors on darwin arm64 (M1)

    SensorsTemperatures returns 0 values for all sensors on darwin arm64 (M1)

    Describe the bug the temperature value of each TemperatureStat object in the array returned by host.SensorsTemperatures() is 0 on an M1.

    To Reproduce

    package main
    
    import (
    	"encoding/json"
    	"fmt"
    	"github.com/shirou/gopsutil/v3/host"
    )
    
    func main() {
    	tstat, _ := host.SensorsTemperatures()
    	serialized, _ := json.Marshal(tstat)
    	fmt.Printf("%s", string(serialized))
    }
    

    Here's the output:

    [
      {
        "sensorKey": "TA0P",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TA1P",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TC0D",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TC0H",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TC0P",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TB0T",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TB1T",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TB2T",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TB3T",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TG0D",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TG0H",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TG0P",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TH0P",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TM0S",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TM0P",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TN0H",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TN0D",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TN0P",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TI0P",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TI1P",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      },
      {
        "sensorKey": "TW0P",
        "temperature": 0,
        "sensorHigh": 0,
        "sensorCritical": 0
      }
    ]
    

    Expected behavior Return valid temperature sensor data for one or more of the sensors.

    Environment (please complete the following information):

    $ sw_vers ProductName: macOS ProductVersion: 12.4 BuildVersion: 21F79

    $ uname -a Darwin xxxx 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64

    Additional context

    go version go1.18 darwin/arm64

    In contrast, here's the output from the same program built and executed on a darwin x86_64 host:

    [
        {
            "sensorKey": "TA0P",
            "temperature": 0,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TA1P",
            "temperature": 0,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TC0D",
            "temperature": 0,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TC0H",
            "temperature": 0,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TC0P",
            "temperature": 31,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TB0T",
            "temperature": 0,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TB1T",
            "temperature": 0,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TB2T",
            "temperature": 0,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TB3T",
            "temperature": 0,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TG0D",
            "temperature": 0,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TG0H",
            "temperature": 0,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TG0P",
            "temperature": 0,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TH0P",
            "temperature": 0,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TM0S",
            "temperature": 0,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TM0P",
            "temperature": 30,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TN0H",
            "temperature": 0,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TN0D",
            "temperature": 0,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TN0P",
            "temperature": 0,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TI0P",
            "temperature": 0,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TI1P",
            "temperature": 0,
            "sensorHigh": 0,
            "sensorCritical": 0
        },
        {
            "sensorKey": "TW0P",
            "temperature": 31,
            "sensorHigh": 0,
            "sensorCritical": 0
        }
    ]
    
  • A lightweight way to get program information?

    A lightweight way to get program information?

    Both NewProcess() and Processes() are currently very CPU intensive, especially on arm architectures. I looked at several discussions about high CPU consumption, but none of them came up. Is there a lightweight way to obtain process information?

memresolver is an in-memory golang resolver that allows to override current golang Lookup func literals

mem-resolver memresolver is an in-memory golang resolver that allows to override current golang Lookup func literals How to use it Create your custom

Jun 23, 2022
Govalid is a data validation library that can validate most data types supported by golang

Govalid is a data validation library that can validate most data types supported by golang. Custom validators can be used where the supplied ones are not enough.

Apr 22, 2022
Code Generation for Functional Programming, Concurrency and Generics in Golang

goderive goderive derives mundane golang functions that you do not want to maintain and keeps them up to date. It does this by parsing your go code fo

Aug 5, 2022
Golang source code parsing, usage like reflect package

gotype Golang source code parsing, usage like reflect package English 简体中文 Usage API Documentation Examples License Pouch is licensed under the MIT Li

Jul 14, 2022
Golang library to act on structure fields at runtime. Similar to Python getattr(), setattr(), hasattr() APIs.

go-attr Golang library to act on structure fields at runtime. Similar to Python getattr(), setattr(), hasattr() APIs. This package provides user frien

Jul 5, 2022
Composable HTML components in Golang
Composable HTML components in Golang

daz Composable HTML components in Golang Daz is a "functional" alternative to using templates, and allows for nested components/lists Also enables tem

Aug 4, 2022
Meteoric golang nitro sniper, 0.1/0.5s claim time.
Meteoric golang nitro sniper, 0.1/0.5s claim time.

Meteoric golang nitro sniper, 0.1/0.5s claim time.

Apr 3, 2021
Golang bindings for GDAL

Golang bindings for GDAL Goals Godal aims at providing an idiomatic go wrapper around the GDAL library: Function calls return a result and an error.

Jul 4, 2022
Minimal UART client in Golang that dumps LPC1343 chips that are locked at CRP1.

Howdy y'all, This is a quick and dirty client for the UART bootloader of the LPC1343, and probably other bootloaders in that chip family. This client

Mar 30, 2022
Cross platform locale detection for Golang

go-locale go-locale is a Golang lib for cross platform locale detection. OS Support Support all OS that Golang supported, except android: aix: IBM AIX

Jul 27, 2022
A Go (golang) library for parsing and verifying versions and version constraints.

go-version is a library for parsing versions and version constraints, and verifying versions against a set of constraints. go-version can sort a collection of versions properly, handles prerelease/beta versions, can increment versions, etc.

Aug 8, 2022
A port of the parser from graphql-js into golang

gqlparser This is a parser for graphql, written to mirror the graphql-js reference implementation as closely while remaining idiomatic and easy to use

Jul 25, 2022
Copier for golang, copy value from struct to struct and more

Copier I am a copier, I copy everything from one to another Features Copy from field to field with same name Copy from method to field with same name

Aug 6, 2022
A library for diffing golang structures

Diff A library for diffing golang structures and values. Utilizing field tags and reflection, it is able to compare two structures of the same type an

Aug 6, 2022
Use Golang to implement PHP's common built-in functions.

PHP2Go Use Golang to implement PHP's common built-in functions. About 140+ functions have been implemented. Install go get github.com/syyongx/php2go R

Aug 9, 2022
Extremely flexible golang deep comparison, extends the go testing package, tests HTTP APIs and provides tests suite
Extremely flexible golang deep comparison, extends the go testing package, tests HTTP APIs and provides tests suite

go-testdeep Extremely flexible golang deep comparison, extends the go testing package. Latest news Synopsis Description Installation Functions Availab

Aug 8, 2022
A well tested and comprehensive Golang statistics library package with no dependencies.

Stats - Golang Statistics Package A well tested and comprehensive Golang statistics library / package / module with no dependencies. If you have any s

Aug 8, 2022
go-sundheit:A library built to provide support for defining service health for golang services
go-sundheit:A library built to provide support for defining service health for golang services

A library built to provide support for defining service health for golang services. It allows you to register async health checks for your dependencies and the service itself, and provides a health endpoint that exposes their status.

Jul 16, 2022
Lightweight, Simple, Quick, Thread-Safe Golang Stack Implementation

stack Lightweight, Simple, Quick, Thread-Safe Golang Stack Implementation Purpose Provide a fast, thread safe, and generic Golang Stack API with minim

May 3, 2022