Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4] Implements v4 for v4.24.0-alpha #1596

Merged
merged 14 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/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
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
This is a port of psutil (https://github.com/giampaolo/psutil). The
challenge is porting all psutil functions on some architectures.

## v3 migration
## migration

### v4 migration

See v4 release note.

### v3 migration

From v3.20.10, gopsutil becomes v3 which breaks backwards compatibility.
See [v3Changes.md](_tools/v3migration/v3Changes.md) for more detailed changes.
Expand All @@ -15,10 +21,10 @@ See [v3Changes.md](_tools/v3migration/v3Changes.md) for more detailed changes.
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 Down Expand Up @@ -52,7 +58,7 @@ package main
import (
"fmt"

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

Expand Down Expand Up @@ -122,11 +128,11 @@ 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

- go1.16 or above is required.
- go1.20 or above is required.

## More Info

Expand Down
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.

171 changes: 0 additions & 171 deletions _tools/v3migration/v3migration.sh

This file was deleted.

1 change: 1 addition & 0 deletions common/env.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: BSD-3-Clause
package common

type EnvKeyType string
Expand Down
26 changes: 0 additions & 26 deletions coverall.sh

This file was deleted.

Loading
Loading