import ( "upper.io/db.v3/mongo" "log" ) sess, err := mongo.DialURL("mongodb://localhost") if err != nil { log.Fatalf("db.DialURL(): %q\n", err) } defer sess.Close() coll := sess.Collection("users") users, err := coll.Find().All() if err != nil { log.Fatalf("Find(): %q\n", err) } for _, u := range users { log.Println(u) }This code connects to a local MongoDB instance, selects the "users" collection, and executes a query to retrieve all documents in the collection. The resulting documents (user objects) are then printed to the console. Other examples of using go upper.io.db Collection include inserting, updating and deleting documents, and executing more complex queries using the Query builder API. The package library supports a variety of databases, including MongoDB, MySQL, SQLite, and PostgreSQL, and offers a consistent, easy-to-use API for working with them.