github.com/nya3jp/tast@v0.0.0-20230601000426-85c8e4d83a9b/src/go.chromium.org/tast/core/internal/rpc/util.go (about) 1 // Copyright 2021 The ChromiumOS Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 package rpc 6 7 import ( 8 "strings" 9 ) 10 11 // isUserMethod checks if a gRPC method belongs to a user-defined gRPC service. 12 func isUserMethod(name string) bool { 13 return !strings.HasPrefix(name, "/tast.core.") 14 } 15 16 // isLoggingMethod checks if a gRPC method belongs to the logging gRPC service. 17 func isLoggingMethod(name string) bool { 18 return strings.HasPrefix(name, "/tast.core.Logging/") 19 }