Created
August 6, 2018 18:13
-
-
Save pulkitkumar/6ce8db709a0406cbb0c0a025e5022c53 to your computer and use it in GitHub Desktop.
GoLang Semantics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package user | |
import ( | |
"io" | |
) | |
type User struct { | |
Name string | |
Email string | |
} | |
func Read(rdr io.Reader) ([]User, error) { | |
// read using reader u.r | |
// rdr.Read() | |
return []User{}, nil | |
} | |
func Write(wtr io.WriteCloser, u []User) error { | |
// write using writer | |
// wtr.Write() | |
return nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment