From 119f9c4915c41935aeb88155fbd2cbea13dabe35 Mon Sep 17 00:00:00 2001 From: Hendrik Schlehlein Date: Thu, 17 Jan 2019 01:44:08 +0100 Subject: [PATCH] clean up --- README.md | 3 +-- service/client.go | 4 ---- stringer/stringer.go | 49 -------------------------------------------- 3 files changed, 1 insertion(+), 55 deletions(-) delete mode 100644 stringer/stringer.go diff --git a/README.md b/README.md index b82dea7..634721c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # tsviewer **[WIP]** -## **WARNING** This API is not usable ATM -A REST API made for TS3 Viewer. +A TS3 Viewer with REST API. # Features ## Config diff --git a/service/client.go b/service/client.go index 85e902f..e6548d8 100644 --- a/service/client.go +++ b/service/client.go @@ -26,10 +26,6 @@ func (s Service) Client(id int) (*client.Client, error) { return nil, errors.New("client does not exist") } - /* if _, err := s.TSClient.Server.ExecCmd(ts3.NewCmd(fmt.Sprintf("clientinfo clid=%d", c.ID)).WithResponse(&c)); err != nil { - return nil, err - } */ - return c, nil } diff --git a/stringer/stringer.go b/stringer/stringer.go deleted file mode 100644 index c77ccf6..0000000 --- a/stringer/stringer.go +++ /dev/null @@ -1,49 +0,0 @@ -package stringer - -import ( - "fmt" - "strings" - "unicode" -) - -func Build(ss ...string) (string, error) { - var builder strings.Builder - - for _, s := range ss { - if _, err := builder.WriteString(s); err != nil { - return "", err - } - } - - return builder.String(), nil -} - -func ToCamel(str string) string { - if len(str) < 1 { - return str - } - - for i, c := range str[1:] { - if c >= 'A' && c <= 'Z' { - str = fmt.Sprintf("%s_%c%s", str[:i+1], unicode.ToLower(c), str[i+2:]) - return ToCamel(str) - } - } - - return str -} - -func ToSnake(str string) string { - if len(str) < 1 { - return str - } - - for i, c := range str[1:] { - if c == '_' { - str = fmt.Sprintf("%s%c%s", str[:i+1], unicode.ToUpper(rune(str[i+2])), str[i+3:]) - return ToSnake(str) - } - } - - return str -}