Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions collector/filesystem_macos.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ package collector
#cgo CFLAGS: -x objective-c
#cgo LDFLAGS: -framework Foundation
#import <Foundation/Foundation.h>
Float64 purgeable(char *path) {
Float64 value = -1.0f;
#include <sys/param.h>
#include <sys/ucred.h>
#include <sys/mount.h>
#include <stdio.h>

double purgeable(char *path) {
double value = -1.0f;

@autoreleasepool {
NSError *error = nil;
Expand Down Expand Up @@ -49,14 +54,6 @@ import (
"unsafe"
)

/*
#include <sys/param.h>
#include <sys/ucred.h>
#include <sys/mount.h>
#include <stdio.h>
*/
import "C"

const (
defMountPointsExcluded = "^/(dev)($|/)"
defFSTypesExcluded = "^devfs$"
Expand Down
2 changes: 1 addition & 1 deletion collector/meminfo_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (c *meminfoCollector) getMemInfo() (map[string]float64, error) {
&infoCount,
)
if ret != C.KERN_SUCCESS {
return nil, fmt.Errorf("Couldn't get memory statistics, host_statistics returned %d", ret)
return nil, fmt.Errorf("couldn't get memory statistics, host_statistics returned %d", ret)
}
totalb, err := unix.Sysctl("hw.memsize")
if err != nil {
Expand Down