Skip to content

Commit

Permalink
feat: support non arm or amd arch
Browse files Browse the repository at this point in the history
  • Loading branch information
joway committed Sep 16, 2024
1 parent 703b2a9 commit 978bdad
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions runtimex.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build arm64 || amd64

// Copyright 2024 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
18 changes: 18 additions & 0 deletions runtimex_other.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//go:build !(arm64 || amd64)

package runtimex

import (
"fmt"
"runtime"
)

var ErrUnimplemented = fmt.Errorf("runtimex: unimplemented in this platform[%s]", runtime.GOARCH)

func GID() (int, error) {
return 0, ErrUnimplemented
}

func PID() (int, error) {
return 0, ErrUnimplemented
}

0 comments on commit 978bdad

Please sign in to comment.