Skip to content

Commit

Permalink
Update biodata.go
Browse files Browse the repository at this point in the history
  • Loading branch information
jaringankantor committed Oct 15, 2021
1 parent 9692450 commit 8f501c6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions biodata.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ import "fmt"

type Active func(string) bool

type Pegawai struct {
LamaBekerja int8
Nama, Divisi string
Aktif bool
}

func User(name string, isAktif Active) {

if isAktif(name) {
Expand All @@ -12,3 +18,14 @@ func User(name string, isAktif Active) {
fmt.Println(name, " Status Non-AKtif")
}
}

func TampilData() {
pegawai := Pegawai{
LamaBekerja: 5,
Nama: "Anwar",
Divisi: "Keuangan",
Aktif: true,
}

fmt.Println(pegawai)
}

0 comments on commit 8f501c6

Please sign in to comment.