Skip to content

Commit

Permalink
Create app.go
Browse files Browse the repository at this point in the history
  • Loading branch information
DeekshithSN committed Dec 4, 2021
1 parent f29ed05 commit eb7e8ee
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions kubernetes-vpa/vpa/app.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package main

import (
"fmt"
"net/http"
)

func main(){
http.HandleFunc("/", useCPU)
http.ListenAndServe(":80", nil)
}

func useCPU(w http.ResponseWriter, r *http.Request) {
count := 1

for i := 1; i <= 1000000; i++ {
count = i
}

fmt.Printf("count: %d", count)
w.Write([]byte(string(count)))
}

0 comments on commit eb7e8ee

Please sign in to comment.