import "github.com/gogits/gogs/models" user := &models.User{ Name: "John Doe", Email: "[email protected]", Password: "password123", } err := user.Create() if err != nil { // handle error }
import "github.com/gogits/gogs/models" user, err := models.GetUserByID(123) if err != nil { // handle error } user.FullName = "Jane Smith" user.Email = "[email protected]" err = user.Update() if err != nil { // handle error }Package Library: github.com/gogits/gogs/models