mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
server, examples, extensions lint compliant (#1109)
these are all automated changes suggested by golint
This commit is contained in:
@@ -7,19 +7,12 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
type Person struct {
|
||||
type person struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
// b, err := ioutil.ReadAll(os.Stdin)
|
||||
// if err != nil {
|
||||
// log.Fatal(err)
|
||||
// }
|
||||
// fmt.Printf("BODY!!! %s", string(b))
|
||||
|
||||
p := &Person{Name: "World"}
|
||||
p := &person{Name: "World"}
|
||||
json.NewDecoder(os.Stdin).Decode(p)
|
||||
fmt.Printf("Hello %v!\n", p.Name)
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
type Person struct {
|
||||
type person struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
func main() {
|
||||
p := &Person{Name: "World"}
|
||||
p := &person{Name: "World"}
|
||||
json.NewDecoder(os.Stdin).Decode(p)
|
||||
mapD := map[string]string{"message": fmt.Sprintf("Hello %s", p.Name)}
|
||||
mapB, _ := json.Marshal(mapD)
|
||||
|
||||
@@ -7,12 +7,12 @@ import (
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type Person struct {
|
||||
type person struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
func main() {
|
||||
p := &Person{Name: "World"}
|
||||
p := &person{Name: "World"}
|
||||
json.NewDecoder(os.Stdin).Decode(p)
|
||||
logrus.Printf("Hello %v!\n", p.Name)
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@ import (
|
||||
|
||||
const lBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
|
||||
type OutputSize struct {
|
||||
type outputSize struct {
|
||||
Size int `json:"size"`
|
||||
}
|
||||
|
||||
func RandStringBytes(n int) string {
|
||||
func randStringBytes(n int) string {
|
||||
b := make([]byte, n)
|
||||
for i := range b {
|
||||
b[i] = lBytes[rand.Intn(len(lBytes))]
|
||||
@@ -22,7 +22,7 @@ func RandStringBytes(n int) string {
|
||||
}
|
||||
|
||||
func main() {
|
||||
out := &OutputSize{Size: 64 * 1024}
|
||||
out := &outputSize{Size: 64 * 1024}
|
||||
json.NewDecoder(os.Stdin).Decode(out)
|
||||
fmt.Fprintln(os.Stderr, RandStringBytes(out.Size))
|
||||
fmt.Fprintln(os.Stderr, randStringBytes(out.Size))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user