Categorygithub.com/pbar1/pkill-go
repositorypackage
1.0.0
Repository: https://github.com/pbar1/pkill-go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

pkill-go

GoDoc Go Report Card

Like pkill and pgrep, in pure Go without using exec.Cmd.

go get github.com/pbar1/pkill-go

Usage

package main

import (
  "fmt"

  "github.com/pbar1/pkill-go"
)

func main() {
  pids, err := pkill.Pgrep("^go$")
  if err != nil {
    fmt.Println(err)
  }
  for _, pid := range pids {
    fmt.Println(pid)
  }
}