mirror of
https://github.com/golang/sys.git
synced 2026-01-29 07:02:06 +03:00
plan9: drop go version tags for unsupported versions
go.mod specifies go 1.24. Drop code for older, unsupported versions. Change-Id: I8a1ecd9e5634c1cf9619fbb89b2ecd0bda7eaf21 Reviewed-on: https://go-review.googlesource.com/c/sys/+/579515 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
committed by
Gopher Robot
parent
0293703b0a
commit
a4712b9054
@@ -1,21 +0,0 @@
|
|||||||
// Copyright 2015 The Go Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
//go:build go1.5
|
|
||||||
|
|
||||||
package plan9
|
|
||||||
|
|
||||||
import "syscall"
|
|
||||||
|
|
||||||
func fixwd() {
|
|
||||||
syscall.Fixwd()
|
|
||||||
}
|
|
||||||
|
|
||||||
func Getwd() (wd string, err error) {
|
|
||||||
return syscall.Getwd()
|
|
||||||
}
|
|
||||||
|
|
||||||
func Chdir(path string) error {
|
|
||||||
return syscall.Chdir(path)
|
|
||||||
}
|
|
||||||
@@ -2,22 +2,18 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build !go1.5
|
|
||||||
|
|
||||||
package plan9
|
package plan9
|
||||||
|
|
||||||
|
import "syscall"
|
||||||
|
|
||||||
func fixwd() {
|
func fixwd() {
|
||||||
|
syscall.Fixwd()
|
||||||
}
|
}
|
||||||
|
|
||||||
func Getwd() (wd string, err error) {
|
func Getwd() (wd string, err error) {
|
||||||
fd, err := open(".", O_RDONLY)
|
return syscall.Getwd()
|
||||||
if err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
defer Close(fd)
|
|
||||||
return Fd2path(fd)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func Chdir(path string) error {
|
func Chdir(path string) error {
|
||||||
return chdir(path)
|
return syscall.Chdir(path)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user