aboutsummaryrefslogtreecommitdiffhomepage
path: root/dbus
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-09-27 12:04:28 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-09-27 12:04:28 +0900
commitee2f5ed6ac2a9b19c9c5135e263bc60397843d44 (patch)
tree686da0459f139445f8782b2f4d43d4b00e33770b /dbus
parent8492239cba18c66c2b6dc76eaf3314f11b38b10b (diff)
dbus/config: remove unused method
Null checking is replaced by helper/args while string building is no longer required. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'dbus')
-rw-r--r--dbus/config.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/dbus/config.go b/dbus/config.go
index 9301f62f..27b5273b 100644
--- a/dbus/config.go
+++ b/dbus/config.go
@@ -1,10 +1,5 @@
package dbus
-import (
- "errors"
- "strings"
-)
-
type Config struct {
// See set 'see' policy for NAME (--see=NAME)
See []string `json:"see"`
@@ -58,23 +53,6 @@ func (c *Config) Args(bus [2]string) (args []string) {
return
}
-func (c *Config) buildSeal(seal *strings.Builder, bus [2]string) error {
- for _, arg := range c.Args(bus) {
- // reject argument strings containing null
- for _, b := range arg {
- if b == '\x00' {
- return errors.New("argument contains null")
- }
- }
-
- // write null terminated argument
- seal.WriteString(arg)
- seal.WriteByte('\x00')
- }
-
- return nil
-}
-
// NewConfig returns a reference to a Config struct with optional defaults.
// If id is an empty string own defaults are omitted.
func NewConfig(id string, defaults, mpris bool) (c *Config) {