mirror of
https://github.com/bootdotdev/fcc-learn-golang-assets.git
synced 2025-12-18 19:21:17 +00:00
first
This commit is contained in:
28
course/4-structs/exercises/1-intro/code.go
Normal file
28
course/4-structs/exercises/1-intro/code.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
type messageToSend struct {
|
||||
}
|
||||
|
||||
// don't edit below this line
|
||||
|
||||
func test(m messageToSend) {
|
||||
fmt.Printf("Sending message: '%s' to: %v\n", m.message, m.phoneNumber)
|
||||
fmt.Println("====================================")
|
||||
}
|
||||
|
||||
func main() {
|
||||
test(messageToSend{
|
||||
phoneNumber: 148255510981,
|
||||
message: "Thanks for signing up",
|
||||
})
|
||||
test(messageToSend{
|
||||
phoneNumber: 148255510982,
|
||||
message: "Love to have you aboard!",
|
||||
})
|
||||
test(messageToSend{
|
||||
phoneNumber: 148255510983,
|
||||
message: "We're so excited to have you",
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user