aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/host
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-05-06 08:33:52 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-05-06 07:51:03 +0000
commitd884b519ef74f7edf51f2c964162f0a2fe80846c (patch)
treec3ce7fc5f922fcc8710e5a8f478c85bd9c52a8f0 /pkg/host
parent610f2a54d02f8cf4f2454c03bf679b602e6e59b6 (diff)
pkg/flatrpc: refactor names
Remove T suffix from object API types. It seems that we will use these types thoughout the code, and the suffix looks alien in Go code. So it's better to remove it before we started using these names more widely. Also add few extensions we will need to move feature checking to the host.
Diffstat (limited to 'pkg/host')
-rw-r--r--pkg/host/machine_info.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/host/machine_info.go b/pkg/host/machine_info.go
index 476205255..006f880d9 100644
--- a/pkg/host/machine_info.go
+++ b/pkg/host/machine_info.go
@@ -11,8 +11,8 @@ import (
"github.com/google/syzkaller/pkg/flatrpc"
)
-func ReadFiles(files []string) []flatrpc.FileInfoT {
- var res []flatrpc.FileInfoT
+func ReadFiles(files []string) []flatrpc.FileInfo {
+ var res []flatrpc.FileInfo
for _, glob := range files {
glob = filepath.FromSlash(glob)
if !strings.Contains(glob, "*") {
@@ -21,7 +21,7 @@ func ReadFiles(files []string) []flatrpc.FileInfoT {
}
matches, err := filepath.Glob(glob)
if err != nil {
- res = append(res, flatrpc.FileInfoT{
+ res = append(res, flatrpc.FileInfo{
Name: glob,
Error: err.Error(),
})
@@ -34,13 +34,13 @@ func ReadFiles(files []string) []flatrpc.FileInfoT {
return res
}
-func readFile(file string) flatrpc.FileInfoT {
+func readFile(file string) flatrpc.FileInfo {
data, err := os.ReadFile(file)
exists, errStr := true, ""
if err != nil {
exists, errStr = !os.IsNotExist(err), err.Error()
}
- return flatrpc.FileInfoT{
+ return flatrpc.FileInfo{
Name: file,
Exists: exists,
Error: errStr,