code: func ListWALs(dirpath string) ([]string, error) {
  	dirents, err := ioutil.ReadDir(dirpath)
  	if err != nil {
  		return nil, err
  	}
  
  	var wals []string
  	for _, dirent := range dirents {
  		if strings.HasSuffix(dirent.Name(), ".wal") {
  			wals = append(wals, dirent.Name())
  		}
  	}
  
  	// Sort WAL filenames in lexical order
  	sort.Sort(sort.StringSlice(wals))
  	return wals, nil
  }
docs: // ListWALs lists all the wals in a directory and returns the list in lexical
  // order (oldest first)