Skip to content

Commit fe69ee6

Browse files
committed
Support for --pid option
1 parent fd1d7be commit fe69ee6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

main.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,10 @@ func client(args []string) {
235235
}
236236
}
237237

238-
func toBytes(i int) (result []byte) {
239-
return []byte(strconv.Itoa(i))
240-
}
241-
242238
func generatePidFile() {
243-
err := ioutil.WriteFile("chisel.pid", toBytes(os.Getpid()), 0644)
239+
pid := []byte(strconv.Itoa(os.Getpid()))
240+
241+
err := ioutil.WriteFile("chisel.pid", pid, 0644)
244242
if err != nil {
245243
log.Fatal(err)
246244
}

0 commit comments

Comments
 (0)