Skip to content

Instantly share code, notes, and snippets.

@vasa-develop
Created January 22, 2020 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vasa-develop/38aa4cf7f00fa9331843e80f350537a2 to your computer and use it in GitHub Desktop.
Save vasa-develop/38aa4cf7f00fa9331843e80f350537a2 to your computer and use it in GitHub Desktop.
SimpleAsWater Tutorial: Hands On IPLD Tutorial: PART 2
scanner := bufio.NewScanner(os.Stdin)
fmt.Println("Enter the ID of the employee: ")
scanner.Scan()
inputID := scanner.Text()
fmt.Println("Enter the name of the employee: ")
scanner.Scan()
inputName := scanner.Text()
fmt.Println("Enter the salary of the employee: ")
scanner.Scan()
inputSalary := scanner.Text()
// Create a struct instance and assign the input values to the corresponding fields
employeeObject := SampleStruct{ID: inputID, Name: inputName, Salary: inputSalary}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment