Skip to content

Commit

Permalink
refactor: Remove version field from compose.yaml
Browse files Browse the repository at this point in the history
fix: Correct formatting of ConfigMap example in Kubernetes introduction

feat: Update startupProbe and readinessProbe in Kubernetes introduction

feat: Update startupProbe failure threshold in Kubernetes introduction

feat: Add probes and update pod lifecycle in Kubernetes introduction

feat: Add string operations examples in Golang concepts
  • Loading branch information
Pradumnasaraf committed Sep 12, 2024
1 parent c544576 commit 7359067
Show file tree
Hide file tree
Showing 4 changed files with 614 additions and 210 deletions.
11 changes: 9 additions & 2 deletions docs/golang/concepts/0) test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,12 @@ package main
import "fmt"

func main() {
fmt.Println("Hello World!")
}
var num int = 42
var numFloat float64 = float64(num)

var numFloat2 = 3.14
var numInt = int(numFloat2)

fmt.Println(numFloat)
fmt.Println(numInt)
}
3 changes: 2 additions & 1 deletion docs/golang/concepts/17) switch-statements.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package main

func main() {

city := "london"
city := "paris"

switch city {
case "london", "manchester": // Here we are checking for multiple values with the same output
println("London or Manchester")
case "paris":
println("Paris ")
fallthrough
case "rome":
println("Rome ")
default: // This is the default case
Expand Down
18 changes: 18 additions & 0 deletions docs/golang/concepts/6) string-opr.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package main

import (
"fmt"
"strings"
)

func main() {

var name = "John"
fmt.Println(len(name)) // It will print the length of the string
fmt.Println(strings.ToUpper(name)) // It will print the string in uppercase
fmt.Println(strings.ToLower(name)) // It will print the string in lowercase
fmt.Println(strings.Title(name)) // It will print the string in title case
fmt.Println(strings.Repeat(name, 3)) // It will repeat the string 3 times
fmt.Println(strings.Replace(name, "J", "K", 1)) // It will replace the first occurrence of J with K
fmt.Println(strings.Split(name, "")) // It will split the string into a slice of characters
}
Loading

0 comments on commit 7359067

Please sign in to comment.