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: fsstat.go
    path of file: ./repos/hubble-ui/backend/vendor/github.com/power-devops/perfstat
    
    the code of the file until where you have to start completion: //go:build aix
// +build aix

package perfstat

/*
#include "c_helpers.h"
*/
import "C"

import (
	"fmt"
)

func FileSystemStat() ([]FileSystem, error) {
	var fsinfo *C.struct_fsinfo
	var nmounts C.int

	fsinfo = C.get_all_fs(&nmounts)
	if nmounts <= 0 {
		return nil
    
func FileSystemStat() ([]FileSystem, error) {
	var fsinfo *C.struct_fsinfo
	var nmounts C.int

	fsinfo = C.get_all_fs(&nmounts)
	if nmounts <= 0 {
		return nil, fmt.Errorf("No mounts found")
	}

	fs := make([]FileSystem, nmounts)
	for i := 0; i < int(nmounts); i++ {
		f := C.get_filesystem_stat(fsinfo, C.int(i))
		if f != nil {
			fs[i] = fsinfo2filesystem(f)
		}
	}
	return fs, nil
}