mirror of
https://github.com/bootdotdev/fcc-learn-golang-assets.git
synced 2025-12-18 11:11:19 +00:00
first
This commit is contained in:
30
course/4-structs/exercises/1-intro/complete.go
Normal file
30
course/4-structs/exercises/1-intro/complete.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
type messageToSend struct {
|
||||
phoneNumber int
|
||||
message string
|
||||
}
|
||||
|
||||
// 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