From 65484b2c3994a1b6b20df09cc963492a66ec0397 Mon Sep 17 00:00:00 2001 From: otherview Date: Tue, 28 Nov 2023 11:54:15 +0000 Subject: [PATCH] comments --- dockerfiles/enclave.Dockerfile | 1 + go/common/flag/flag.go | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dockerfiles/enclave.Dockerfile b/dockerfiles/enclave.Dockerfile index 2ac4c8d01d..65c72bdcb1 100644 --- a/dockerfiles/enclave.Dockerfile +++ b/dockerfiles/enclave.Dockerfile @@ -9,6 +9,7 @@ # /home/obscuro/go-obscuro/go/enclave/main contains the executable for the enclave # +# Defaults to restricted flag mode ARG RESTRICTEDMODE=true FROM ghcr.io/edgelesssys/ego-dev:v1.3.0 AS build-base diff --git a/go/common/flag/flag.go b/go/common/flag/flag.go index 5e8c36b6a2..6511130b3a 100644 --- a/go/common/flag/flag.go +++ b/go/common/flag/flag.go @@ -8,7 +8,7 @@ import ( "strings" ) -// WrappedFlag is a construct that allows to have go flags while obeying to a new set of restricteveness rules +// WrappedFlag is a construct that allows to have go flags while obeying to a new set of restrictiveness rules type WrappedFlag struct { flagType string ptr any @@ -16,17 +16,17 @@ type WrappedFlag struct { description string } -// GetString returns the flag current value casted to string +// GetString returns the flag current value cast to string func (f WrappedFlag) GetString() string { return *f.ptr.(*string) } -// GetInt64 returns the flag current value casted to int64 +// GetInt64 returns the flag current value cast to int64 func (f WrappedFlag) GetInt64() int64 { return *f.ptr.(*int64) } -// GetBool returns the flag current value casted to bool +// GetBool returns the flag current value cast to bool func (f WrappedFlag) GetBool() bool { return *f.ptr.(*bool) }