Skip to content

Commit

Permalink
anonymous function
Browse files Browse the repository at this point in the history
  • Loading branch information
jaringankantor committed Oct 15, 2021
1 parent 903ebe1 commit 9692450
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions biodata.go
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
package module

import "fmt"

type Active func(string) bool

func User(name string, isAktif Active) {

if isAktif(name) {
fmt.Println(name, " Status Aktif")
} else {
fmt.Println(name, " Status Non-AKtif")
}
}

0 comments on commit 9692450

Please sign in to comment.