diff options
| author | Jakob Unterwurzacher | 2017-06-05 22:03:15 +0200 | 
|---|---|---|
| committer | Jakob Unterwurzacher | 2017-06-07 22:07:56 +0200 | 
| commit | 22820bcd76a781d09ce82f6e734013d55afc1e5c (patch) | |
| tree | a4bb5e5a5e383e8faacf4b25b0df76c691bf0feb | |
| parent | 0ac5e44137e457dad2a7f5408fb475bf69c642fa (diff) | |
main: reorder force_owner flag parsing
No functional changes, just keeping the profiling-related flags
together.
| -rw-r--r-- | main.go | 24 | 
1 files changed, 12 insertions, 12 deletions
| @@ -185,18 +185,6 @@ func main() {  	} else {  		args.config = filepath.Join(args.cipherdir, configfile.ConfDefaultName)  	} -	// "-cpuprofile" -	if args.cpuprofile != "" { -		tlog.Info.Printf("Writing CPU profile to %s", args.cpuprofile) -		var f *os.File -		f, err = os.Create(args.cpuprofile) -		if err != nil { -			tlog.Fatal.Println(err) -			os.Exit(exitcodes.Init) -		} -		pprof.StartCPUProfile(f) -		defer pprof.StopCPUProfile() -	}  	// "-force_owner"  	if args.force_owner != "" {  		var uidNum, gidNum int64 @@ -217,6 +205,18 @@ func main() {  		}  		args._forceOwner = &fuse.Owner{Uid: uint32(uidNum), Gid: uint32(gidNum)}  	} +	// "-cpuprofile" +	if args.cpuprofile != "" { +		tlog.Info.Printf("Writing CPU profile to %s", args.cpuprofile) +		var f *os.File +		f, err = os.Create(args.cpuprofile) +		if err != nil { +			tlog.Fatal.Println(err) +			os.Exit(exitcodes.Init) +		} +		pprof.StartCPUProfile(f) +		defer pprof.StopCPUProfile() +	}  	// "-memprofile"  	if args.memprofile != "" {  		tlog.Info.Printf("Writing mem profile to %s", args.memprofile) | 
