happy lint

This commit is contained in:
Boshi Lian 2022-07-06 17:27:39 +00:00
parent 93da136a94
commit bc9875c4b5
7 changed files with 39 additions and 27 deletions

View file

@ -2,25 +2,12 @@ package libplugin
import (
"fmt"
"io"
"net"
"os"
"strconv"
"github.com/sirupsen/logrus"
)
func WriterToFile(writer io.Writer) (*os.File, error) {
r, w, err := os.Pipe()
if err != nil {
return nil, err
}
go io.Copy(writer, r)
return w, nil
}
func AuthMethodTypeToName(a AuthMethod) string {
switch a {
case AuthMethod_NONE: