Skip to content

Commit

Permalink
Merge pull request #1628 from shirou/release/v4
Browse files Browse the repository at this point in the history
Release/v4
  • Loading branch information
shirou authored Jun 1, 2024
2 parents 4336530 + 9d35f6e commit 3489a34
Show file tree
Hide file tree
Showing 253 changed files with 1,187 additions and 1,171 deletions.
2 changes: 2 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ package:net:
- net/*
package:process:
- process/*
package:sensors:
- sensors/*
package:winservices:
- winservices/*
os:linux:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
run: |
versions=$(curl -s 'https://go.dev/dl/?mode=json' | jq -c 'map(.version[2:])')
echo "::set-output name=value::${versions}"
build_test_v3:
build_test:
needs: go-versions
strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
run: |
versions=$(curl -s 'https://go.dev/dl/?mode=json' | jq -c 'map(.version[2:])')
echo "::set-output name=value::${versions}"
test_v3_module:
test:
needs: go-versions
strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ macos_test:
init_tools:
go get github.com/golang/dep/cmd/dep

TAG=$(shell date +'v3.%y.%-m' --date='last Month')
TAG=$(shell date +'v4.%y.%-m' --date='last Month')

release:
git tag $(TAG)
Expand Down
27 changes: 12 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@
This is a port of psutil (https://github.com/giampaolo/psutil). The
challenge is porting all psutil functions on some architectures.

## v3 migration
## migration

From v3.20.10, gopsutil becomes v3 which breaks backwards compatibility.
See [v3Changes.md](_tools/v3migration/v3Changes.md) for more detailed changes.
### v4 migration

See v4 release note.

## Tag semantics

gopsutil tag policy is almost same as Semantic Versioning, but
automatically increases like [Ubuntu versioning](https://calver.org/).

For example, v2.17.04 means
For example, v4.24.04 means

- v2: major version
- 17: release year, 2017
- v4: major version
- 24: release year, 2024
- 04: release month

gopsutil aims to keep backwards compatibility until major version change.
Expand All @@ -33,16 +34,14 @@ can be skipped.
- Windows i386/amd64/arm/arm64
- Darwin amd64/arm64
- OpenBSD i386/amd64/armv7/arm64/riscv64 (Thank you @mpfz0r!)
- Solaris amd64 (developed and tested on SmartOS/Illumos, Thank you
@jen20!)
- Solaris amd64 (developed and tested on SmartOS/Illumos, Thank you @jen20!)

These have 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 structs to golang
structs.
All works are implemented without cgo by porting C structs to golang structs.

## Usage

Expand All @@ -52,8 +51,7 @@ package main
import (
"fmt"

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

func main() {
Expand Down Expand Up @@ -122,7 +120,7 @@ Be very careful that enabling the cache may cause inconsistencies. For example,

## Documentation

See https://pkg.go.dev/github.com/shirou/gopsutil/v3 or https://godocs.io/github.com/shirou/gopsutil/v3
See https://pkg.go.dev/github.com/shirou/gopsutil/v4 or https://godocs.io/github.com/shirou/gopsutil/v4

## Requirements

Expand Down Expand Up @@ -322,5 +320,4 @@ I have been influenced by the following great works:
4. Push to the branch (git push origin my-new-feature)
5. Create new Pull Request

English is not my native language, so PRs correcting grammar or spelling
are welcome and appreciated.
English is not my native language, so PRs correcting grammar or spelling are welcome and appreciated.
18 changes: 0 additions & 18 deletions _tools/v3migration/v3Changes.md

This file was deleted.

106 changes: 0 additions & 106 deletions _tools/v3migration/v3migration.go

This file was deleted.

Loading

0 comments on commit 3489a34

Please sign in to comment.