You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: page.go
    path of file: ./repos/gotosocial/internal/paging
    
    the code of the file until where you have to start completion: // GoToSocial
// Copyright (C) GoToSocial A
    
func (p *Page) Prev(lo, hi string) *Page {
	if p == nil || lo == "" || hi == "" {
		// no paging.
		return nil
	}

	// Create new page.
	p2 := new(Page)

	// Set original limit.
	p2.Limit = p.Limit

	if p.order().Ascending() {
		// When ascending, prev page
		// needs to start with max at
		// the next lowest value.
		p2.Min = p.Min.new("")
		p2.Max = p.Max.new(lo)
	} else {
		// When descending, next page
		// needs to start with max at
		// the next lowest value.
		p2.Min = p.Min.new(hi)
		p2.Max = p.Max.new("")
	}

	return p2
}