Skip to content

Commit

Permalink
chore: more amazing stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
puni9869 committed May 29, 2024
1 parent 1f55a5c commit 7c31e7f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions hacks/hacks.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package main

import "fmt"

type User struct {
Id string
Password string
}

func (u User) Format(f fmt.State, verb rune) {
// Put what you want to show on screen
f.Write([]byte(fmt.Sprintf("ID: %s", u.Id)))
}

// If you don't want to display password when you print User
// Output: User ID: UUID

func main() {
user := User{Id: "UUID", Password: "I will not ganna tell you"}
fmt.Print("User ", user)
}

0 comments on commit 7c31e7f

Please sign in to comment.